chenlu
2025-11-26 80e73d98a876af4b6c9efff7c74e908b056d8f4e
添加生产报表默认查询时间相关配置部分代码
17个文件已修改
388 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/ar.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/en.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/kr.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/ru.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/zh.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/上海北玻.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/天津北玻.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/常州吉利.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/新疆恒鑫.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/洛阳北玻.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/温州巨星.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/金华天成.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/dto/pp/TeamOutputDTO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderFileService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/Report.xml 210 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -475,7 +475,7 @@
      <tr v-for="(itemtextareas,index) in item.detail" :key="index">
        <td  colspan="31"  style="width: 480px;height: 150px ">
          <div style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 16px;font-weight: bold;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea>
          <div style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 14px;font-weight: bold;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea>
          </div>
        </td>
      </tr>
north-glass-erp/northglass-erp/src/lang/ar.js
@@ -1156,7 +1156,8 @@
        finishedProductReport :'تقرير Ø§Ù„منتجات Ø§Ù„نهائية',
        workProcessName:'在制品名称',
        StorageArea:'入库面积',
        shippedArea:'发货面积'
        shippedArea:'发货面积',
        thicknessArea:'平方毫米'
    },
    productionBasicData:{
north-glass-erp/northglass-erp/src/lang/en.js
@@ -1156,7 +1156,8 @@
        finishedProductReport :'Finished product report',
        workProcessName:'在制品名称',
        StorageArea:'入库面积',
        shippedArea:'发货面积'
        shippedArea:'发货面积',
        thicknessArea:'平方毫米'
    },
    productionBasicData:{
north-glass-erp/northglass-erp/src/lang/kr.js
@@ -1156,7 +1156,8 @@
        finishedProductReport :'완제품 ë³´ê³ ì„œ',
        workProcessName:'在制品名称',
        StorageArea:'入库面积',
        shippedArea:'发货面积'
        shippedArea:'发货面积',
        thicknessArea:'平方毫米'
    },
    productionBasicData:{
north-glass-erp/northglass-erp/src/lang/ru.js
@@ -1156,7 +1156,8 @@
        finishedProductReport :'Отчет Ð¾ Ð³Ð¾Ñ‚овой Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ†Ð¸Ð¸',
        workProcessName:'在制品名称',
        StorageArea:'入库面积',
        shippedArea:'发货面积'
        shippedArea:'发货面积',
        thicknessArea:'平方毫米'
    },
    productionBasicData:{
north-glass-erp/northglass-erp/src/lang/zh.js
@@ -1158,7 +1158,8 @@
        finishedProductReport :'成品报表',
        workProcessName:'在制品名称',
        StorageArea:'入库面积',
        shippedArea:'发货面积'
        shippedArea:'发货面积',
        thicknessArea:'平方毫米'
    },
    productionBasicData:{
north-glass-erp/northglass-erp/src/stores/sd/companySet/ÉϺ£±±²£.js
@@ -50,6 +50,8 @@
        alienFunction:false,//是否开启异形功能,暂时都是false
        replenishQRCode:1,//是否补片二维码是否拆分层,1拆分,2不拆
        soleQRCode:false,//流程卡合并二维码显示单层,义乌true.其它false
        reportTime:"08:00",//次破、产量报表默认时间
        processFontSize:false,//流程卡加工要求字体加大
        //天津
        printLabel: {
            custom: (item1) => {
north-glass-erp/northglass-erp/src/stores/sd/companySet/Ìì½ò±±²£.js
@@ -49,6 +49,8 @@
        alienFunction:false,//是否开启异形功能,暂时都是false
        replenishQRCode:2,//是否补片二维码是否拆分层,1拆分,2不拆
        soleQRCode:false,//流程卡合并二维码显示单层,义乌true.其它false
        reportTime:"08:00",//次破、产量报表默认时间
        processFontSize:false,//流程卡加工要求字体加大
        //天津
        printLabel: {
            custom: (item1) => {
north-glass-erp/northglass-erp/src/stores/sd/companySet/³£ÖݼªÀû.js
@@ -49,6 +49,8 @@
        alienFunction:false,//是否开启异形功能,暂时都是false
        replenishQRCode:1,//是否补片二维码是否拆分层,1拆分,2不拆
        soleQRCode:false,//流程卡合并二维码显示单层,义乌true.其它false
        reportTime:"08:00",//次破、产量报表默认时间
        processFontSize:false,//流程卡加工要求字体加大
        //天津
        printLabel: {
            custom: (item1) => {
north-glass-erp/northglass-erp/src/stores/sd/companySet/н®ºãöÎ.js
@@ -49,6 +49,8 @@
        alienFunction:false,//是否开启异形功能,暂时都是false
        replenishQRCode:1,//是否补片二维码是否拆分层,1拆分,2不拆
        soleQRCode:false,//流程卡合并二维码显示单层,义乌true.其它false
        reportTime:"08:00",//次破、产量报表默认时间
        processFontSize:false,//流程卡加工要求字体加大
        //天津
        printLabel: {
            custom: (item1) => {
north-glass-erp/northglass-erp/src/stores/sd/companySet/ÂåÑô±±²£.js
@@ -50,6 +50,8 @@
        alienFunction:false,//是否开启异形功能,暂时都是false
        replenishQRCode:1,//是否补片二维码是否拆分层,1拆分,2不拆
        soleQRCode:false,//流程卡合并二维码显示单层,义乌true.其它false
        reportTime:"08:00",//次破、产量报表默认时间
        processFontSize:false,//流程卡加工要求字体加大
        //天津
        printLabel: {
            custom: (item1) => {
north-glass-erp/northglass-erp/src/stores/sd/companySet/ÎÂÖݾÞÐÇ.js
@@ -51,6 +51,8 @@
        alienFunction:true,//是否开启异形功能,暂时都是false
        replenishQRCode:1,//是否补片二维码是否拆分层,1拆分,2不拆
        soleQRCode:false,//流程卡合并二维码显示单层,义乌true.其它false
        reportTime:"07:30",//次破、产量报表默认时间
        processFontSize:true,//流程卡加工要求字体加大
        //天津
        printLabel: {
            custom: (item1) => {
north-glass-erp/northglass-erp/src/stores/sd/companySet/½ð»ªÌì³É.js
@@ -51,6 +51,8 @@
        alienFunction:false,//是否开启异形功能,暂时都是false
        replenishQRCode:1,//是否补片二维码是否拆分层,1拆分,2不拆
        soleQRCode:true,//流程卡合并二维码显示单层,义乌true.其它false
        reportTime:"08:00",//次破、产量报表默认时间
        processFontSize:false,//流程卡加工要求字体加大
        //天津
        printLabel: {
            custom: (item1) => {
north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue
@@ -9,10 +9,12 @@
import footSum from "@/hook/footSum"
import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"
import {VxeUI} from "vxe-pc-ui";
import companyInfo from "@/stores/sd/companyInfo";
//语言获取
const {t} = useI18n()
let router = useRouter()
let filterData = ref({})
const company = companyInfo()
//提交的表单
const form = reactive({
  date1: '',
@@ -65,6 +67,7 @@
  return includeEnd ? diffDays + 1 : diffDays
}
const times=company.reportTime
//获取七天前到当前时间
function getNowTime() {
  const pad = (n) => n.toString().padStart(2, '0');
@@ -73,7 +76,7 @@
    const year = date.getFullYear();
    const month = pad(date.getMonth() + 1);
    const day = pad(date.getDate());
    return `${year}-${month}-${day} 08:00:00`;
    return `${year}-${month}-${day} ${times}`;
  };
  const now = new Date();
@@ -112,7 +115,7 @@
let year = date.getFullYear();
let month = pad(date.getMonth() + 1);
let day = pad(date.getDate());
let newEndTime = `${year}-${month}-${day} 08:00:00`;
let newEndTime = `${year}-${month}-${day} ${times}`;
//第一次加载数据
request.post(`/report/teamOutput/1/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => {
@@ -136,14 +139,28 @@
//页脚翻页查询
const selectPageList = () => {
  gridOptions.loading = true
  // è§£æž company.reportTime
  const [reportHourStr, reportMinuteStr] = company.reportTime.split(":");
  const reportHour = parseInt(reportHourStr);
  const reportMinute = parseInt(reportMinuteStr);
  // åŽŸå§‹ form.date1 æ˜¯æ—¥æœŸå¯¹è±¡æ•°ç»„
  const rawStart = new Date(form.date1[0]);
  const rawEnd = new Date(form.date1[1]);
  // å¦‚果时间部分是 00:00,则设置为 08:00
  if (rawStart.getHours() === 8 || rawStart.getHours() === 0) {
    rawStart.setHours(8, 0, 0, 0);
  // åˆ¤æ–­æ—¶é—´éƒ¨åˆ†æ˜¯å¦éœ€è¦ä¿®æ­£ä¸º company.reportTime
  const isZeroOrReport = (dateObj) => {
    const h = dateObj.getHours();
    const m = dateObj.getMinutes();
    // åˆ¤æ–­æ¡ä»¶ï¼šæ˜¯ 00:00 æˆ–者是 reportTime å¯¹åº”的时间
    return (h === 0 && m === 0) || (h === reportHour && m === reportMinute);
  };
  if (isZeroOrReport(rawStart)) {
    rawStart.setHours(reportHour, reportMinute, 0, 0);
  }
  if (rawEnd.getHours() === 8 || rawEnd.getHours() === 0) {
    rawEnd.setHours(8, 0, 0, 0);
  if (isZeroOrReport(rawEnd)) {
    rawEnd.setHours(reportHour, reportMinute, 0, 0);
  }
  const startTime = formatDateTime(rawStart);
  const endPlusOne = new Date(rawEnd);
@@ -178,48 +195,71 @@
//点击查询
const getWorkOrder = () => {
  gridOptions.loading = true
  gridOptions.loading = true;
  // è§£æž company.reportTime
  const [reportHourStr, reportMinuteStr] = company.reportTime.split(":");
  const reportHour = parseInt(reportHourStr);
  const reportMinute = parseInt(reportMinuteStr);
  // åŽŸå§‹ form.date1 æ˜¯æ—¥æœŸå¯¹è±¡æ•°ç»„
  const rawStart = new Date(form.date1[0]);
  const rawEnd = new Date(form.date1[1]);
  // å¦‚果时间部分是 00:00,则设置为 08:00
  if (rawStart.getHours() === 8 || rawStart.getHours() === 0) {
    rawStart.setHours(8, 0, 0, 0);
  // åˆ¤æ–­æ—¶é—´éƒ¨åˆ†æ˜¯å¦éœ€è¦ä¿®æ­£ä¸º company.reportTime
  const isZeroOrReport = (dateObj) => {
    const h = dateObj.getHours();
    const m = dateObj.getMinutes();
    // åˆ¤æ–­æ¡ä»¶ï¼šæ˜¯ 00:00 æˆ–者是 reportTime å¯¹åº”的时间
    return (h === 0 && m === 0) || (h === reportHour && m === reportMinute);
  };
  if (isZeroOrReport(rawStart)) {
    rawStart.setHours(reportHour, reportMinute, 0, 0);
  }
  if (rawEnd.getHours() === 8 || rawEnd.getHours() === 0) {
    rawEnd.setHours(8, 0, 0, 0);
  if (isZeroOrReport(rawEnd)) {
    rawEnd.setHours(reportHour, reportMinute, 0, 0);
  }
  // æ ¼å¼åŒ–
  const startTime = formatDateTime(rawStart);
  const endPlusOne = new Date(rawEnd);
  endPlusOne.setDate(endPlusOne.getDate());
  const newEndTime = formatDateTime(endPlusOne);
  const selectProcesses = procseeValue.value;
  const timeDifference = getDaysBetween(startTime, newEndTime)
  if (timeDifference>180){
    ElMessage.warning(t('report.theTimeLimitCannotExceed180Days'))
    gridOptions.loading = false
    return
  }
  form.date1 = [startTime, newEndTime];
  request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => {
    if (res.code == 200) {
      total.value = res.data.footSum
      total.dataTotal = res.data.total.total * 1
      total.pageTotal = res.data.total.pageTotal
      pageTotal.value = res.data.total
      produceList = res.data.data
      produceList.forEach(item => {
        item.mmTotal = sumMmValues(item.workProcessName);
  const selectProcesses = procseeValue.value;
  const timeDifference = getDaysBetween(startTime, newEndTime);
  if (timeDifference > 180) {
    ElMessage.warning(t('report.theTimeLimitCannotExceed180Days'));
    gridOptions.loading = false;
    return;
  }
  form.date1 = [startTime, newEndTime];
  request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value)
      .then((res) => {
        if (res.code == 200) {
          total.value = res.data.footSum;
          total.dataTotal = res.data.total.total * 1;
          total.pageTotal = res.data.total.pageTotal;
          pageTotal.value = res.data.total;
          produceList = res.data.data;
          produceList.forEach(item => {
            item.mmTotal = sumMmValues(item.workProcessName);
          });
          xGrid.value.loadData(produceList);
          gridOptions.loading = false;
        } else {
          ElMessage.warning(res.msg);
        }
      });
      xGrid.value.loadData(produceList)
      gridOptions.loading = false
    } else {
      ElMessage.warning(res.msg)
    }
  })
}
 const sumMmValues = (workProcessName) => {
  if (!workProcessName) return 0;
@@ -261,14 +301,28 @@
    filterData.value[column.property] = value
  }
  // è§£æž company.reportTime
  const [reportHourStr, reportMinuteStr] = company.reportTime.split(":");
  const reportHour = parseInt(reportHourStr);
  const reportMinute = parseInt(reportMinuteStr);
  // åŽŸå§‹ form.date1 æ˜¯æ—¥æœŸå¯¹è±¡æ•°ç»„
  const rawStart = new Date(form.date1[0]);
  const rawEnd = new Date(form.date1[1]);
  // å¦‚果时间部分是 00:00,则设置为 08:00
  if (rawStart.getHours() === 8 || rawStart.getHours() === 0) {
    rawStart.setHours(8, 0, 0, 0);
  // åˆ¤æ–­æ—¶é—´éƒ¨åˆ†æ˜¯å¦éœ€è¦ä¿®æ­£ä¸º company.reportTime
  const isZeroOrReport = (dateObj) => {
    const h = dateObj.getHours();
    const m = dateObj.getMinutes();
    // åˆ¤æ–­æ¡ä»¶ï¼šæ˜¯ 00:00 æˆ–者是 reportTime å¯¹åº”的时间
    return (h === 0 && m === 0) || (h === reportHour && m === reportMinute);
  };
  if (isZeroOrReport(rawStart)) {
    rawStart.setHours(reportHour, reportMinute, 0, 0);
  }
  if (rawEnd.getHours() === 8 || rawEnd.getHours() === 0) {
    rawEnd.setHours(8, 0, 0, 0);
  if (isZeroOrReport(rawEnd)) {
    rawEnd.setHours(reportHour, reportMinute, 0, 0);
  }
  const startTime = formatDateTime(rawStart);
  const endPlusOne = new Date(rawEnd);
@@ -362,7 +416,8 @@
    {field: 'code', width: 100, title: t('reportingWorks.glassNumber')},
    {field: 'width', width: 90, title: t('order.width')},
    {field: 'height', width: 90, title: t('order.height')},
    {field: 'mmTotal', width: 90, title: t('order.totalThickness')},
    {field: 'thicknessSum',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 90, title: t('order.totalThickness')},
    {field: 'thicknessArea', width: 90, title: t('report.thicknessArea')},
    {
      field: 'deviceName', width: 140, title: t('machine.basicName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }
    },
@@ -397,7 +452,7 @@
        if (columnIndex === 0) {
          return t('basicData.total')
        }
        const List = ["completedQuantity",'area',]
        const List = ["completedQuantity",'area','thicknessArea']
        if (List.includes(column.field)) {
          //return footSum(data, column.field)
          return total.value?.[column.field] ?? 0
north-glass-erp/src/main/java/com/example/erp/dto/pp/TeamOutputDTO.java
@@ -53,4 +53,8 @@
    private String batch;
    @ExcelProperty("订单类型")
    private String orderType;
    @ExcelProperty("在制品厚度")
    private String thicknessSum;
    @ExcelProperty("平方毫米")
    private String thicknessArea;
}
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderFileService.java
@@ -67,7 +67,7 @@
            // è®¾ç½®å®½åº¦
            rasterizationOptions.setPageWidth(1000);
            // è®¾ç½®é«˜åº¦
            rasterizationOptions.setPageHeight(1000);
            rasterizationOptions.setPageHeight(700);
            // è°ƒç”¨è¿™ä¸ªsetEmbedBackground方法来设置背景色是否不等于输出格式的默认背景色
            //rasterizationOptions.setEmbedBackground(true);
            // ä¸ºç”Ÿæˆçš„图像创建一个PngOptions的实例,并将其分配给ImageOptionsBase类的实例。
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -132,6 +132,8 @@
        <result column="workProcessName" property="workProcessName"/>
        <result column="device_name" property="deviceName"/>
        <result column="order_type" property="orderType"/>
        <result column="thicknessSum" property="thicknessSum"/>
        <result column="thicknessArea" property="thicknessArea"/>
    </resultMap>
    <resultMap id="scheduleProductionScheduleMap" type="com.example.erp.dto.pp.ScheduleProductionScheduleDTO">
@@ -1669,7 +1671,25 @@
    <select id="teamOutputMp" resultMap="teamOutputMap">
        SELECT
        *
        t.*,
        -- çŽ»ç’ƒæ€»åŽšåº¦ï¼ˆmm)
        (
        SELECT SUM(CAST(REGEXP_SUBSTR(seg, '^[0-9]+') AS UNSIGNED))
        FROM JSON_TABLE(
        CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]'),
        '$[*]' COLUMNS (seg VARCHAR(100) PATH '$')
        ) jt
        ) AS thicknessSum,
        ROUND(
        (
        SELECT SUM(CAST(REGEXP_SUBSTR(seg, '^[0-9]+') AS UNSIGNED))
        FROM JSON_TABLE(
        CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]'),
        '$[*]' COLUMNS (seg VARCHAR(100) PATH '$')
        ) jt2
        ) * t.area,
        2
        ) AS thicknessArea
        FROM
        (
        SELECT
@@ -1778,6 +1798,10 @@
        <if test="teamOutputDTO.workProcessName != null and teamOutputDTO.workProcessName != ''">
            AND t.workProcessName REGEXP #{teamOutputDTO.workProcessName}
        </if>
        HAVING 1 = 1
        <if test="teamOutputDTO.thicknessSum != null and teamOutputDTO.thicknessSum != ''">
            AND thicknessSum REGEXP #{teamOutputDTO.thicknessSum}
        </if>
        ORDER BY
        t.this_process,
        t.process_id,
@@ -1854,52 +1878,116 @@
    <select id="teamOutputPageTotal">
        SELECT
        CEILING(count(*)/#{pageSize}) as 'pageTotal',
        count(*) as 'total'
        FROM
        CEILING(COUNT(*) / #{pageSize}) AS pageTotal,
        COUNT(*) AS total
        FROM (
        SELECT
        t.*,
        CASE
        WHEN t.workProcessName IS NULL OR t.workProcessName = '' THEN 0
        ELSE (
        SELECT SUM(CAST(REGEXP_SUBSTR(seg, '^[0-9]+') AS UNSIGNED))
        FROM JSON_TABLE(
        CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]'),
        '$[*]' COLUMNS (seg VARCHAR(100) PATH '$')
        ) jt
        )
        END AS thicknessSum,
        CASE
        WHEN t.workProcessName IS NULL OR t.workProcessName = '' THEN 0
        ELSE ROUND(
        (
        SELECT SUM(CAST(REGEXP_SUBSTR(seg2, '^[0-9]+') AS UNSIGNED))
        FROM JSON_TABLE(
        CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]'),
        '$[*]' COLUMNS (seg2 VARCHAR(100) PATH '$')
        ) jt2
        ) * t.area,
        2
        )
        END AS thicknessArea
        FROM (
        SELECT
        rw.reporting_work_time,
        rw.this_process,
        rw.teams_groups_name,
        o.project,
        o.order_id,
        rw.process_id,
        fc.order_number,
        MAX( ogd.child_width ) as width,
        MAX( ogd.child_height ) as height,
        MAX(ogd.child_width)  AS width,
        MAX(ogd.child_height) AS height,
        od.edging_type,
        rwd.completed_quantity as completed_quantity,
        ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*rwd.completed_quantity/1000000,2) as area,
        rwd.completed_quantity AS completed_quantity,
        ROUND(MAX(ogd.child_width) * MAX(ogd.child_height) * rwd.completed_quantity / 1000000, 2) AS area,
        od.product_name,
        JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code
        JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS code,
        rw.reviewed,
        rw.examine_time,
        rw.device_name,
        o.order_type,
        CASE
        WHEN LOCATE('step', #{laminating}) > 0 THEN GROUP_CONCAT(ogd.glass_child SEPARATOR '+')
        ELSE MAX(ogd.glass_child)
        END AS workProcessName,
        o.batch
        FROM
        pp.reporting_work as rw left join pp.reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id
        left join pp.flow_card as fc on fc.order_id=rw.order_id and fc.process_id=rw.process_id  and fc.order_number=rwd.order_number and fc.technology_number=rwd.technology_number
        left join sd.order_glass_detail as ogd on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number and ogd.technology_number=fc.technology_number
        left join sd.order_detail as od  on od.order_id=ogd.order_id and od.order_number=ogd.order_number
        left join sd.`order` as o on o.order_id=od.order_id
        where o.create_order>0 and rw.reviewed_state>=0 and rwd.completed_quantity>0 and
        rw.reporting_work_time >= #{selectTime1}
        pp.reporting_work AS rw
        LEFT JOIN pp.reporting_work_detail AS rwd
        ON rwd.reporting_work_id = rw.reporting_work_id
        LEFT JOIN pp.flow_card AS fc
        ON fc.order_id = rw.order_id
        AND fc.process_id = rw.process_id
        AND fc.order_number = rwd.order_number
        AND fc.technology_number = rwd.technology_number
        LEFT JOIN sd.order_glass_detail AS ogd
        ON ogd.order_id = fc.order_id
        AND ogd.order_number = fc.order_number
        AND ogd.technology_number = fc.technology_number
        LEFT JOIN sd.order_detail AS od
        ON od.order_id = ogd.order_id
        AND od.order_number = ogd.order_number
        LEFT JOIN sd.`order` AS o
        ON o.order_id = od.order_id
        WHERE
        o.create_order > 0
        AND rw.reviewed_state >= 0
        AND rwd.completed_quantity > 0
        AND rw.reporting_work_time &gt;= #{selectTime1}
        AND rw.reporting_work_time &lt;  #{selectTime2}
        and position(#{selectProcesses} in rw.this_process)
        <choose>
            <!-- æœ‰ä¼ å·¥åºï¼šç²¾ç¡®åŒ¹é… -->
            <when test="selectProcesses != null and selectProcesses != ''">
                AND rw.this_process = #{selectProcesses}
            </when>
            <!-- æœªä¼ å·¥åºï¼šä¸åŠ é™åˆ¶ -->
            <otherwise>
            </otherwise>
        </choose>
        <if test="teamOutputDTO.thisProcess != null and teamOutputDTO.thisProcess != ''">
            and rw.this_process regexp #{teamOutputDTO.thisProcess}
            AND rw.this_process REGEXP #{teamOutputDTO.thisProcess}
        </if>
        <if test="teamOutputDTO.teamsGroupsName != null and teamOutputDTO.teamsGroupsName != ''">
            and rw.teams_groups_name like concat('%', #{teamOutputDTO.teamsGroupsName}, '%')
            AND rw.teams_groups_name LIKE CONCAT('%', #{teamOutputDTO.teamsGroupsName}, '%')
        </if>
        <if test="teamOutputDTO.project != null and teamOutputDTO.project != ''">
            and o.project regexp #{teamOutputDTO.project}
            AND o.project REGEXP #{teamOutputDTO.project}
        </if>
        <if test="teamOutputDTO.processId != null and teamOutputDTO.processId != ''">
            and rw.process_id regexp #{teamOutputDTO.processId}
            AND rw.process_id REGEXP #{teamOutputDTO.processId}
        </if>
        <if test="teamOutputDTO.edgingType != null and teamOutputDTO.edgingType != ''">
            and od.edging_type regexp #{teamOutputDTO.edgingType}
            AND od.edging_type REGEXP #{teamOutputDTO.edgingType}
        </if>
        <if test="teamOutputDTO.deviceName != null and teamOutputDTO.deviceName != ''">
            AND rw.device_name REGEXP #{teamOutputDTO.deviceName}
        </if>
        <if test="teamOutputDTO.batch != null and teamOutputDTO.batch != ''">
            AND o.batch REGEXP #{teamOutputDTO.batch}
        </if>
        <choose>
            <when test="laminating == ''">
                GROUP BY
@@ -1919,13 +2007,19 @@
                rwd.order_number
            </otherwise>
        </choose>
        ORDER BY
        rw.this_process,
        rw.process_id,
        rwd.order_number,
        rw.reporting_work_time,
        rw.teams_groups_name
        ) as page_toal
        ) t
        WHERE 1 = 1
        <if test="teamOutputDTO.workProcessName != null and teamOutputDTO.workProcessName != ''">
            AND t.workProcessName REGEXP #{teamOutputDTO.workProcessName}
        </if>
        ) x
        WHERE 1 = 1
        <if test="teamOutputDTO.thicknessSum != null and teamOutputDTO.thicknessSum != ''">
            AND x.thicknessSum REGEXP #{teamOutputDTO.thicknessSum}
        </if>
        <if test="teamOutputDTO.thicknessArea != null and teamOutputDTO.thicknessArea != ''">
            AND x.thicknessArea REGEXP #{teamOutputDTO.thicknessArea}
        </if>
        limit #{offset},#{pageSize}
    </select>
@@ -2506,10 +2600,43 @@
    <select id="teamOutputFootSum">
        SELECT
        SUM(completed_quantity) as completedQuantity,
        ifnull(SUM(ROUND(width * height * completed_quantity / 1000000, 2)),0) AS area
        FROM
        -- æ•°é‡åˆè®¡
        SUM(x.completed_quantity)              AS completedQuantity,
        -- é¢ç§¯åˆè®¡
        IFNULL(SUM(x.area), 0)                 AS area,
        -- åŽšåº¦Ã—é¢ç§¯åˆè®¡
        IFNULL(SUM(x.thicknessArea), 0)        AS thicknessArea
        FROM (
        /* ç¬¬ 2 å±‚:在这里根据 workProcessName è®¡ç®— thicknessSum / thicknessArea */
        SELECT
        t.*,
        /* çŽ»ç’ƒæ€»åŽšåº¦ï¼šåªå–æ¯æ®µå‰é¢çš„æ•°å­—ç›¸åŠ  */
        CASE
        WHEN t.workProcessName IS NULL OR t.workProcessName = '' THEN 0
        ELSE (
        SELECT SUM(CAST(REGEXP_SUBSTR(seg, '^[0-9]+') AS UNSIGNED))
        FROM JSON_TABLE(
        CAST(CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]') AS JSON),
        '$[*]' COLUMNS (seg VARCHAR(100) PATH '$')
        ) jt
        )
        END AS thicknessSum,
        /* åŽšåº¦ Ã— é¢ç§¯ */
        CASE
        WHEN t.workProcessName IS NULL OR t.workProcessName = '' THEN 0
        ELSE ROUND(
        (
        SELECT SUM(CAST(REGEXP_SUBSTR(seg2, '^[0-9]+') AS UNSIGNED))
        FROM JSON_TABLE(
        CAST(CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]') AS JSON),
        '$[*]' COLUMNS (seg2 VARCHAR(100) PATH '$')
        ) jt2
        ) * t.area,
        2
        )
        END AS thicknessArea
        FROM (
        /* ç¬¬ 1 å±‚:只负责算好 workProcessName、area ç­‰åŸºç¡€å­—段 */
        SELECT
        rw.reporting_work_time,
        rw.this_process,
@@ -2570,7 +2697,7 @@
            AND rw.this_process REGEXP #{teamOutputDTO.thisProcess}
        </if>
        <if test="teamOutputDTO.teamsGroupsName != null and teamOutputDTO.teamsGroupsName != ''">
            and rw.teams_groups_name like concat('%', #{teamOutputDTO.teamsGroupsName}, '%')
            AND rw.teams_groups_name LIKE CONCAT('%', #{teamOutputDTO.teamsGroupsName}, '%')
        </if>
        <if test="teamOutputDTO.project != null and teamOutputDTO.project != ''">
            AND o.project REGEXP #{teamOutputDTO.project}
@@ -2614,12 +2741,17 @@
        <if test="teamOutputDTO.workProcessName != null and teamOutputDTO.workProcessName != ''">
            AND t.workProcessName REGEXP #{teamOutputDTO.workProcessName}
        </if>
        ORDER BY
        t.this_process,
        t.process_id,
        t.order_number,
        t.reporting_work_time,
        t.teams_groups_name
        ) x
        WHERE 1 = 1
        <if test="teamOutputDTO.thicknessSum != null and teamOutputDTO.thicknessSum != ''">
            AND x.thicknessSum REGEXP #{teamOutputDTO.thicknessSum}
        </if>
        <if test="teamOutputDTO.thicknessArea != null and teamOutputDTO.thicknessArea != ''">
            AND x.thicknessArea REGEXP #{teamOutputDTO.thicknessArea}
        </if>
        ;
    </select>
    <select id="getLaminating">