chenlu
8 天以前 25cc86fd8a2fb3b2bb6b385cba0adaf89ff3dcdc
流程卡进度打印部分代码
1个文件已添加
9个文件已修改
692 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/lang/zh.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/router/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProgressProcessCard.vue 544 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/ProcessCard.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/Report.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/zh.js
@@ -600,6 +600,7 @@
        terminationNo:'取消终止',
        updateProcessMsg:'保存失败!请检查变更工序是否报工',
        termination:'终止',
        printProgressProcessCard:'流程卡进度打印',
        quantity:'工程用数量',
        print1:'11列4行',
north-glass-erp/northglass-erp/src/router/index.js
@@ -587,6 +587,12 @@
              name: 'printProjectDetailSmallPiece',
              component: () => import('../views/pp/processCard/PrintProjectDetailSmallPiece.vue'),
            },
            {
              path: 'PrintProgressProcessCard',
              name: 'PrintProgressProcessCard',
              component: () => import('../views/pp/processCard/PrintProgressProcessCard.vue'),
            },
            {
              path: '',
              redirect:'/main/processCard/selectProcessCard'
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -426,6 +426,7 @@
          printRow.value.flashback = flashback.value
          printRow.value.landingSequence=landingSequence.value
          printRow.value.compound = compound.value
          console.log(printRow.value)
          // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
          if(company.companyName=='常州市吉利玻璃有限公司'){
            dialogTableVisibleStraight.value = true
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProgressProcessCard.vue
New file
@@ -0,0 +1,544 @@
<script setup>
import request from "@/utils/request"
import {ElDatePicker, ElMessage} from "element-plus"
import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
import {Search} from "@element-plus/icons-vue"
import {useRoute, useRouter} from 'vue-router'
import {changeFilterEvent, filterChanged} from "@/hook"
import {addListener} from "@/hook/mouseMove";
import { useI18n } from 'vue-i18n'
import footSum from "@/hook/footSum";
import {VxeUI} from "vxe-pc-ui";
import useOrderInfoStore from "@/stores/sd/order/orderInfo"
import {Printer} from "@element-plus/icons-vue/global";
import PrintProcess from "@/components/pp/PrintProcess.vue";
import PrintCustomLabelXJ from "@/components/pp/PrintCustomLabelTwo.vue";
import companyInfo from "@/stores/sd/companyInfo";
//语言获取
const { t } = useI18n()
let router=useRouter()
const route = useRoute()
const orderInfo = useOrderInfoStore()
const company = companyInfo()
const dialogTableVisible = ref(false)
const dialogTableVisibleLabel = ref(false)
let props = defineProps({
  orderId:null
})
onMounted(()=>{
  getTags()
  filterData.value = orderInfo.selectProcessCardFilter.data
  orderInfo.selectProcessCardFilter.list.forEach(item =>{
    xGrid.value.getColumnByField(item.field).filters = item.column.filters
  })
  //启用表格拖动选中
  addListener(xGrid.value, gridOptions)
  if(props.orderId===null  || props.orderId===undefined || props.orderId===''){
  }else{
    form.orderId = props.orderId
    getWorkOrder()
  }
  if(route.query.orderId===null  || route.query.orderId===undefined || route.query.orderId===''){
  }else {
    form.orderId = route.query.orderId
    getWorkOrder()
  }
})
//打印流程卡条件
let printRow = ref({
  list: null,//选中的数据
  printMergeVal: null,
  like: null,
  merge: null,
  printFc:null,
  flashback:null,
  landingSequence:null,
  compound:null
})
//表尾求和
const sumNum = (list, field) => {
  let count = 0
  list.forEach(item => {
    count += Number(item[field])
  })
  return count.toFixed(2)
}
//筛选条件,有外键需要先定义明细里面的数据
let filterData = ref({
  order: {
    project: ''
  },
  orderDetail: {
    productId: '',
    productName: '',
    computeGrossArea: '',
    processingNote: '',
  }
})
//需要合并的列
let column = [1,3,8]
//点击查询
const getWorkOrder = () => {
  gridOptions.loading = true
  gridOptions.columns = gridOptions.columns.slice(0, 17); //清除动态生成的列重新查询
  request.post(`/processCard/PrintProgressProcessCard/${orderInfo.workOrderDate}`, column).then((res) => {
    if (res.code == 200) {
      if (res.data.data.length === 0) {
        ElMessage.warning(t('report.noDataFoundForThisOrder'))
        return
      }
      orderInfo.workOrderDate = res.data.selectDate
      const processList = {
        title:t('report.workingProcedure'),
        field:'process',
        children:[]
      }
      // 动态添加列
      res.data.title.forEach((item,index) =>{
        let column = {
          slots: { default: 'quantitySum' },
          width: 100,
          title: item.process,
          field: `dynamicColumn${index}` // 为动态列添加唯一的 field
        }
        processList.children.push(column)
      })
      gridOptions.columns.push(processList)
      res.data.data.forEach(item => {
        item.reportWorkQuantity=JSON.parse(item.reportWorkQuantity)
        item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount)
        item.reportWorkQuantityShow=JSON.parse(item.reportWorkQuantityShow)
      })
      gridOptions.loading = false
      //mergeCells.value = res.data.mergeCell
      xGrid.value.loadData(res.data.data)
    } else {
      gridOptions.loading = false
      ElMessage.warning(res.msg)
    }
  })
}
const footSumDynamic = (data, columnTitle) => {
  let sum = 0;
  data.forEach(item => {
    const value = Number(item.reportWorkQuantity[columnTitle]) || 0; // 从 reportWorkQuantity 中提取值并转换为数字
    sum += value;
  });
  return sum.toFixed(2);
}
const quantitySum = ( row,column )=>{
  const reportWorkQuantityCount = row.reportWorkQuantityCount[column.title] || ''
  const reportWorkQuantityShow = row.reportWorkQuantityShow[column.title] || ''
  if(reportWorkQuantityShow === reportWorkQuantityCount ){
    return reportWorkQuantityShow
  }
  return (reportWorkQuantityShow
      +'('
      +reportWorkQuantityCount
      +')' )
}
const tags = ref([])
const tag = ref({
  id: null,
  name: null,
  type: 1,
  tagWidth: null,
  tagHeight: null,
  value: null,
  size: null
})
const getTags = () => {
  request.get('tagStyle/getTagList').then(res => {
    res.data.forEach(item => {
      item.value = JSON.parse(item.value)
    })
    tags.value = res.data
  })
}
/*后端返回结果多层嵌套展示*/
const hasDecimal = (value) => {
  const regex = /\./; // 定义正则表达式,查找小数点
  return regex.test(value); // 返回true/false
}
const xGrid = ref()
const gridOptions = reactive({
  loading: false,
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮
  id: 'ProcessCardProgress',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
                    // remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },//表头参数
  columns : [
    {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80},
    {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
    {field: 'order_id', width: 120,
      title: t('order.orderId'),
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    {field: 'project', width: 150,
      title: t('order.project'),
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    {field: 'customer_name', width: 150,
      title: t('customer.customerName'),
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    {field: 'product_name', width: 150,
      title: t('order.product'),
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    {field: 'glass_child',width: 130, title:  t('reportingWorks.glassChild') ,filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    {field: 'order_type', width: 120,title: t('order.orderType'),filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    {field: 'process_id',width: 150, title: t('processCard.processId'),filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    {field: 'print_status', width: 120,title: t('processCard.numberTimesProcessCardPrinted')},
    {field: 'print_number', width: 110,title: t('processCard.numberLabelPrintingOperations')},
    {field: 'order_number', width: 100,title: t('order.OrderNum'),showOverflow:"ellipsis",filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    // {field: 'glassNumber', width: 110,title: t('reportingWorks.glassNumber'),showOverflow:"ellipsis",filters: [{data: ''}],
    //   slots: {filter: 'num1_filter'},
    //   filterMethod: filterChanged},
    {field: 'technology_number', width: 110,title: t('processCard.technologyNumber'),showOverflow:"ellipsis",filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    {field: 'quantity', width: 90,title: t('order.quantity')},
    {field: 'grossArea', width: 90,title: t('order.area')},
    {field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')},
    // {field: 'shippedQuantity',width: 120, title: t('report.shippedQuantity')},
    {field: 'Storage',width: 120, title: t('report.inventoryNum')},
    {field: 'StorageAreaShow',width: 120, title: t('report.inventoryArea')},
  ],
  toolbarConfig: {
    buttons: [
      {code: 'print', name: t('processCard.print'), status: 'primary'},
      {code: 'printLabel', name: t('processCard.printLabel'), status: 'primary'},
    ],
    // import: false,
    // export: true,
    // print: true,
    zoom: true,
    custom: true
  },
  data:  [
  ],//table body实际数据
  //脚部求和
  footerMethod ({ columns, data }) {
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return t('basicData.total')
        }
        const List = ["quantity", "broken_num", "inventory", "inventoryArea","gross_area"]; // 静态列的求和
        if (List.includes(column.field)) {
          return footSum(data, column.field)
        }
        // 动态列的求和
        if (column.field && column.field.startsWith('dynamicColumn')) {
          return footSumDynamic(data, column.title)
        }
        return ''
      })
    ]
  }
})
const gridEvents = {
  async toolbarButtonClick({code}) {
    const $grid = xGrid.value
    selectRecords = $grid.getCheckboxRecords()
    // selectRecords.forEach(obj => {
    //   delete obj.print_status;
    // });
    let type = tag.value.name
    let faceOrientation = stateValue.value
    let lableTypes = lableType.value
    let lableTitle = lableType.text
    if ($grid) {
      switch (code) {
          //打印流程卡
        case 'print': {
          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          let id = ""
          for (let i = 0; i < selectRecords.length; i++) {
            if (i + 1 === selectRecords.length) {
              id += selectRecords[i].id
            } else {
              id += selectRecords[i].id + "|"
            }
          }
          printRow.value.list = JSON.stringify(selectRecords)
          printRow.value.printMergeVal = printMerge.value
          printRow.value.like = null
          printRow.value.merge = company.flowCardMerge
          printRow.value.printFc= printFc
          printRow.value.flashback = flashback.value
          printRow.value.landingSequence=landingSequence.value
          printRow.value.compound = compound.value
          dialogTableVisible.value = true
          break
        }
        case 'printLabel': {
          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          if (tag.value.name === null || tag.value.name === '' || tag.value.name === undefined) {
            ElMessage.warning(t('processCard.pleaseSelectCustomPrintLabelStyle'))
            return
          }
          let id = ""
          for (let i = 0; i < selectRecords.length; i++) {
            if (i + 1 === selectRecords.length) {
              id += selectRecords[i].id
            } else {
              id += selectRecords[i].id + "|"
            }
          }
          labelRow.value.list = JSON.stringify(selectRecords)
          labelRow.value.faceOrientation = faceOrientation
          labelRow.value.type = tag.value.name
          labelRow.value.lableType = lableTypes
          labelRow.value.dataType = 1
          dialogTableVisibleLabel.value = true
          break
        }
      }
    }
  },
}
const form = reactive({
  orderId: '',
})
const mergeCells = ref([
])
const handleCellDblClick = ({ row, column, cell, $event }) => {
  VxeUI.clipboard.copy(row[column.property])
}
</script>
<template>
  <div  style="width: 100%;height: 100%">
    <div class="head">
      <el-date-picker
          v-model="orderInfo.workOrderDate"
          :default-time="defaultTime"
          :end-placeholder="$t('basicData.endDate')"
          :start-placeholder="$t('basicData.startDate')"
          format="YYYY/MM/DD"
          type="daterange"
          value-format="YYYY-MM-DD"
      />
      &nbsp;&nbsp;
      <el-button
          :disabled="props.orderId"
          @click="getWorkOrder"
          id="select"
          type="primary" :icon="Search">{{$t('basicData.search')}}
      </el-button>
      &nbsp;&nbsp;
        <label>{{ $t('processCard.labelStyle') }}:</label>
        <el-select v-model="tag" :placeholder="$t('processCard.pleaseSelect')" style="width: 140px" @change="changeTag">
          <el-option
              v-for="(tag,index) in tags"
              :key="index"
              :label="tag.name"
              :value="tag"
          />
        </el-select>
    </div>
    <div class="main-table">
      <vxe-grid
          height="100%"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="gridOptions"
          :merge-cells="mergeCells"
          @cell-dblclick="handleCellDblClick"
      >
        <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
        <!--      下拉显示所有信息插槽-->
        <template #content="{ row }">
          <ul class="expand-wrapper">
            <li  v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
              <span style="font-weight: bold">{{item.title+':  '}}</span>
              <span>{{ row[item.field] }}</span>
            </li>
          </ul>
        </template>
        <template #num1_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <input v-model="option.data"
                     type="text"
                     @keyup.enter.native="$panel.confirmFilter()"
                     @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </template>
        <template #quantitySum="{ row,column }">
          <span>{{ quantitySum(row,column) }} </span>
        </template>
      </vxe-grid>
    </div>
    <!--  流程卡打印  -->
    <el-dialog
        id="sizePrintCalrd"
        v-model="dialogTableVisible"
        :title="$t('processCard.print')"
        destroy-on-close
        style="width: 75%;height:75% ">
      <template #header="{ close, titleId, titleClass }">
        <el-button v-print="printContent" :icon="Printer" circle @click="printNumber"/>
      </template>
      <print-process
          id="child"
          :printLike="printRow.like"
          :printList="printRow.list"
          :printMerge="printRow.printMergeVal"
          :printFc="printRow.printFc"
          :merges="printRow.merge"
          :flashback = "printRow.flashback"
          :landingSequence = "printRow.landingSequence"
          :compound = "printRow.compound"
          style="width: 100%;height: 100%"/>
    </el-dialog>
   <!--    成品标签-->
    <el-dialog
        id="sizeCustom"
        v-model="dialogTableVisibleLabel"
        :title="$t('processCard.printLabel')"
        destroy-on-close
        style="width: 80%;height:75% ">
      <template #header="{ close, titleId, titleClass }">
        <el-tooltip
            class="box-item"
            effect="dark"
            :content="$t('processCard.yesTitle')"
            placement="top"
        >
          <el-button :icon="Printer" circle @click="printOrder(1)"/>
        </el-tooltip>
        <el-tooltip
            class="box-item"
            effect="dark"
            :content="$t('processCard.noTitle')"
            placement="top"
        >
          <el-button @click="printOrder(3)">
            <i class="vxe-icon-print"></i>
          </el-button>
        </el-tooltip>
      </template>
      <print-custom-label-x-j id="childLabel"
                              :faceOrientation="labelRow.faceOrientation"
                              :lableType="labelRow.lableType"
                              :list="labelRow.list"
                              :lastList='lastList'
                              :type="labelRow.type"
                              style="width: 100%;height: 100%"/>
    </el-dialog>
  </div>
</template>
<style scoped>
.head{
  width: 100%;
  height: 35px;
}
.main-table{
  width: 100%;
  height: calc(100% - 35px);
}
.vxe-grid {
  /* 禁用浏览器默认选中 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
</style>
north-glass-erp/northglass-erp/src/views/pp/processCard/ProcessCard.vue
@@ -28,7 +28,8 @@
        <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/processCard/productionScheduling' }">{{$t('processCard.scheduling')}}
        </el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/processCard/selectPrintFlowCard' }" >{{ $t('basicData.print') }}</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(5)" :class="indexFlag===5?'indexTag':''" :to="{ path: '/main/processCard/selectPrintProject' }" >{{$t('processCard.engineeringPrinting')}}</el-breadcrumb-item>
<!--        <el-breadcrumb-item @click="changeRouter(5)" :class="indexFlag===5?'indexTag':''" :to="{ path: '/main/processCard/printProgressProcessCard' }" >{{ $t('processCard.printProgressProcessCard') }}</el-breadcrumb-item>-->
        <el-breadcrumb-item @click="changeRouter(6)" :class="indexFlag===6?'indexTag':''" :to="{ path: '/main/processCard/selectPrintProject' }" >{{$t('processCard.engineeringPrinting')}}</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/processCard/selectPrintFlowCard' }" style="display: none">{{ $t('basicData.print') }}</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -549,4 +549,10 @@
    public Result selectProcessCardProgress(@RequestBody Map<String, String> object) {
        return flowCardService.selectProcessCardProgressSv(object);
    }
    @ApiOperation("流程卡进度打印")
    @PostMapping("/PrintProgressProcessCard/{selectDate}")
    public Result PrintProgressProcessCard(@PathVariable List<String> selectDate, @RequestBody List<String> columns) {
        return Result.success(flowCardService.PrintProgressProcessCardSv(selectDate, columns));
    }
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -301,4 +301,8 @@
    List<Map<String, Object>> getNewProcessMp(String processId, String orderNumber, String technologyNumber);
    Map<String, Object> getProcessInfo( String processName);
    List<Map<String, String>> OrderProcess();
    List<Map<String, String>> PrintProgressProcessCardData(String startDate, String endDate);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -1790,6 +1790,31 @@
        }
        return true;
    }
    public Map<String, Object> PrintProgressProcessCardSv(List<String> selectDate, List<String> columns) {
        String endDate = LocalDate.now().toString();
        String startDate = LocalDate.now().minusDays(15).toString();
        if(selectDate !=null && selectDate.size()==2){
            if(!selectDate.get(0).isEmpty()){
                startDate = selectDate.get(0);
            }
            if(!selectDate.get(1).isEmpty()){
                endDate = selectDate.get(1);
            }
        }
        Map<String, Object> map = new HashMap<>();
        //获取表格内容数据
        List<Map<String, String>> dataList = flowCardMapper.PrintProgressProcessCardData(startDate, endDate);
        //获取表头工序筛选数据
        List<Map<String, String>> uniqueList = flowCardMapper.OrderProcess();
        map.put("title", uniqueList);
        List<String> list = new ArrayList<>();
        list.add(startDate);
        list.add(endDate);
        map.put("selectDate",list);
        map.put("data",dataList );
        return map;
    }
}
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -3935,4 +3935,104 @@
        select basic_name as process,sort FROM sd.basic_data as bd
        where bd.basic_category='process' and bd.basic_name = #{processName}
    </select>
    <select id="OrderProcess">
        select DISTINCT basic_name as process,nickname,sort from sd.basic_data where basic_category = 'process'
    </select>
    <select id="PrintProgressProcessCardData">
        select a.product_name,
        b.glass_child,
        d.order_type,
        c.process_id,
        c.process_id as 'processId',
        c.order_id,
        c.order_number,
        c.technology_number,
        b.child_width,
        b.child_height,
        c.quantity,
        c.quantity-ifnull(c.termination_quantity,0) as thisQuantity,/*用于判断是否改变颜色*/
        e.reportWorkQuantity,
        e.reportWorkQuantityShow,
        e.reportWorkQuantityCount,
        e.reportWorkTime,
        e.broken_num,
        c.quantity-ifnull(c.termination_quantity,0) as glassQuantity,
        c.quantity-ifnull(c.termination_quantity,0) as quantityShow,
        round( (c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2) as grossAreaShow,
        ifnull(c.received_quantity, 0) as StorageShow,
        ifnull(dd.quantity, 0) as shippedQuantityShow, -- 发货数量
        round(ifnull(dd.quantity, 0)*a.compute_area,2) as shippedAreaShow, -- 发货面积
        round((ifnull(c.received_quantity, 0))*a.compute_area,2)  as StorageAreaShow,-- 入库面积
        round((c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2)as grossArea,
        ifnull(c.received_quantity, 0)                       as Storage,
        ifnull(dd.quantity, 0)                        as shippedQuantity,
        round(ifnull(dd.quantity, 0)*a.compute_area,2)        as shippedArea,
        round((ifnull(c.received_quantity, 0))*a.compute_area,2) as StorageArea,
        ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber,
        b.`group`,
        c.print_status,
        c.print_number,
        o.project,
        o.customer_name
        from pp.flow_card as c
        left join
        sd.order_detail as a
        on c.order_id = a.order_id
        and c.order_number = a.order_number
        left join sd.order_glass_detail as b
        on c.order_id = b.order_id
        and b.order_number = c.order_number
        and c.technology_number = b.technology_number
        left join sd.`order` as d
        on c.order_id = d.order_id
        #                  left join mm.finished_goods_inventory as f
        #                            on c.order_id = f.order_id and f.order_number = c.order_number
        left join sd.delivery_detail as dd on dd.order_id = a.order_id and dd.order_number = a.order_number
        left join (SELECT a.process_id,
        a.order_number,
        a.technology_number,
        sum(a.broken_num) as broken_num,
        concat('{',
        GROUP_CONCAT(concat("\"", process, "\":\"", if(a.technology_number!=1 and (bd.nickname='stepD' || bd.nickname='stepB' ) ,0,reporting_work_num), "\"")),
        '}'
        )             as reportWorkQuantity,
        concat('{',
        GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num, "\"")),
        '}'
        )             as reportWorkQuantityShow,
        concat('{',
        GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num_count, "\"")),
        '}'
        )             as reportWorkQuantityCount,
        concat('{',
        GROUP_CONCAT(concat("\"", process, "\":\"", IFNULL(date(a.update_time),''), "\"")),
        '}'
        )             as reportWorkTime
        FROM sd.order_process_detail as a
        left join (SELECT DISTINCT basic_name,nickname from sd.basic_data as bd where  bd.basic_category = 'process') as bd
        on a.process = bd.basic_name
        left join pp.flow_card as fc on fc.process_id=a.process_id and fc.order_number=a.order_number and fc.technology_number=a.technology_number
        where (fc.create_time) >= #{startDate} and (fc.create_time) &lt;= #{endDate}
        GROUP BY a.process_id, a.order_number, a.technology_number
        ) as e
        on e.process_id = c.process_id
        and e.technology_number = c.technology_number
        and e.order_number = c.order_number
        left join sd.`order` as o on o.order_id =c.order_id
        where (c.create_time) >= #{startDate} and (c.create_time) &lt;= #{endDate}
        and d.create_order>0 and c.quantity-ifnull(c.termination_quantity,0)>0
        group by c.order_number,
        c.technology_number,
        c.process_id
        order by c.process_id, c.order_number, c.technology_number
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -2979,7 +2979,7 @@
        od.quantity,
        ogd.child_width,
        ogd.child_height,
        d.numCounts + d.patchNumSum - d.numCount -d.broken_num as stockNum,
        d.numCounts + d.patchNumSum - d.numCount -d.broken_num-ifnull(fc.termination_quantity,0) as stockNum,
        ROUND(ogd.child_width * ogd.child_height *
        (d.numCounts + d.patchNumSum - d.numCount -
        d.broken_num) / 1000000, 2) as stockArea,