guoyujie
9 天以前 eba3314826d53ff0f7e5679d185baaff84e50354
Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
22个文件已修改
1 文件已重命名
837 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet3.vue 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet4.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/router/index.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/order/orderInfo.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/ProjectCreate.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/OptimizationRect.vue 265 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/machine/Machine.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/productionBasicData/AddMachine.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/productionBasicData/ProductionBasicData.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue 100 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/YieldProcess.vue 121 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/GlassOptimizeService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/Report.xml 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -386,7 +386,7 @@
    <tr v-for="(itemDatile,index) in item.detailList" :key="index">
      <td>{{ itemDatile.order_number }}</td>
      <td>{{ itemDatile.mapNumber }}</td>
      <td v-if="name=='金华福喜天成玻璃有限公司'">{{ itemDatile.building_number }}</td>
      <td v-if="name=='金华福喜天成玻璃有限公司' || name=='浙江巨星嘉泰新材料有限公司' ">{{ itemDatile.building_number }}</td>
      <td v-else>{{ itemDatile.s01Value }}</td>
      <td>{{ itemDatile.technology_number }}</td>
      <td>{{ itemDatile.child_width }}</td>
@@ -567,6 +567,20 @@
@media print {
  /* 禁用 Chrome 自动页码触发条件 */
  * {
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
  }
  [style*="position: fixed"],
  .fixed,
  .header-fixed {
    position: absolute !important;
  }
  @page {
    size: auto;  /* auto is the initial value */
    margin: 4mm 5mm 10mm 5mm  /* this affects the margin in the printer settings */
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet3.vue
@@ -215,29 +215,33 @@
            <template v-for="(item, index) in itme1.data" :key="index" >
              <thead>
              <tr v-if="index===0">
                <th style="width: 9%;">楼层编号</th>
                <th style="width: 14%;" colspan="1">宽X高</th>
                <th style="width: 8%;">数量</th>
                <th style="width: 9%;">面积</th>
                <th style="width: 9%;">单价</th>
                <th style="width: 9.5%;">金额</th>
                <th style="width: 6%;">面积</th>
                <th style="width: 6%;">单价</th>
                <th style="width: 6.5%;">金额</th>
                <th style="width: 1%;"></th>
                <th style="width: 9%;">楼层编号</th>
                <th style="width: 14%;" colspan="1">宽X高</th>
                <th style="width: 8%;">数量</th>
                <th style="width: 9%;">面积</th>
                <th style="width: 9%;">单价</th>
                <th style="width: 9.5%;">金额</th>
                <th style="width: 6%;">面积</th>
                <th style="width: 6%;">单价</th>
                <th style="width: 6.5%;">金额</th>
                <th style="width: 1%;"></th>
              </tr>
              </thead>
              <tr>
                <td style="font-size: 15px;text-align: left" colspan="5">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td>
                <td style="font-size: 15px;text-align: left" colspan="6">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td>
                <td style="font-size: 15px;text-align: left" colspan="3">批次:<span>{{item.DeliveryDetail.order.batch}}</span></td>
                <td style="font-size: 15px;text-align: left" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td>
                <td style="font-size: 15px;text-align: left" colspan="4">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td>
              </tr>
              <tr class="day-in" v-for="(group, groupIndex) in item.groupedDeliveryDetails" :key="groupIndex">
                <!-- 第一列数据(组内第一条) -->
                <td>{{ group[0].buildingNumber }}</td>
                <td style="font-size: 15px;font-weight: bold;">
                  {{ group[0].parsedOtherColumns?.S02 ? `(${group[0].parsedOtherColumns.S02})` : '' }}
                  {{ group[0].width }}x{{ group[0].height }}
@@ -249,6 +253,7 @@
                <td></td> <!-- 分隔列 -->
                <!-- 第二列数据(组内第二条,若存在) -->
                <td v-if="group[1]">{{ group[1].buildingNumber }}</td>
                <td style="font-size: 15px;font-weight: bold;" v-if="group[1]">
                  {{ group[1].parsedOtherColumns?.S02 ? `(${group[1].parsedOtherColumns.S02})` : '' }}
                  {{ group[1].width }}x{{ group[1].height }}
@@ -262,7 +267,7 @@
                <td v-else colspan="5"></td>
              </tr>
              <tr class="day-in" >
                <td style="font-size: 15px;" colspan="7">小计:</td>
                <td style="font-size: 15px;" colspan="9">小计:</td>
                <td>{{item.DeliveryDetail.quantity}}</td>
                <td>{{item.DeliveryDetail.area}}</td>
                <td></td>
@@ -271,14 +276,14 @@
            </template>
            <tr class="day-in">
              <td style="font-size: 15px;" colspan="7">合计:</td>
              <td style="font-size: 15px;" colspan="9">合计:</td>
              <td>{{itme1.delivery.quantity}}</td>
              <td>{{itme1.delivery.area}}</td>
              <td></td>
              <td>{{parseFloat(itme1.sumMoney.toFixed(2))}}</td>
            </tr>
            <tr class="day-in">
              <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6" colspan="6">
              <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6" colspan="7">
                <div style="display: flex;font-size: 10px;text-align: center;">
                  <span style="width: 25%;font-weight: bold;font-size: 12px">加工费用</span>&nbsp;
                  <span  style="width: 25%;font-weight: bold;font-size: 12px">单价</span>&nbsp;
@@ -286,10 +291,10 @@
                  <span  style="width: 25%;font-weight: bold;font-size: 12px">金额</span>
                </div>
              </td>
              <td style="text-align: left;border:none;font-size: 15px;" colspan="5">总金额:&nbsp;&nbsp;&nbsp;&nbsp;{{itme1.delivery.money}}</td>
              <td style="text-align: left;border:none;font-size: 15px;" colspan="6">总金额:&nbsp;&nbsp;&nbsp;&nbsp;{{itme1.delivery.money}}</td>
            </tr>
            <tr class="day-in">
              <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6;" colspan="6" >
              <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6;" colspan="7" >
                <div style="display: flex;font-size: 10px;text-align: center" v-for="(item, index2) in itme1.otherMoney1" :key="index2">
                  <span style="width: 25%">{{item.DeliveryDetailOtherMoney.alias}}</span>&nbsp;
                  <span  style="width: 25%">{{item.DeliveryDetailOtherMoney.price}}</span>&nbsp;
@@ -303,7 +308,7 @@
                  <span  style="width: 25%">{{itme1.delivery.freight}}</span>
                </div>
              </td>
              <td style="text-align: left;border:none;font-size: 15px;" colspan="5">大写金额:&nbsp;&nbsp;&nbsp;&nbsp;{{itme1.money}}</td>
              <td style="text-align: left;border:none;font-size: 15px;" colspan="6">大写金额:&nbsp;&nbsp;&nbsp;&nbsp;{{itme1.money}}</td>
            </tr>
@@ -317,7 +322,7 @@
                  </el-row>-->
            <tr class="day-in" style="border: 0;" v-if="company.showDeliveryCreator">
              <td colspan="11" style="border: 0">
              <td colspan="13" style="border: 0">
                <div style="display:flex;text-align: left"  class="bottom">
                  <div style="width: 15%">制单员:{{ itme1.delivery.creator }}</div>
                  <div style="width: 25%">制单日期:{{ itme1.delivery.createTime }}</div>
@@ -329,7 +334,7 @@
              </td>
            </tr>
            <tr class="day-in" style="border: 0;" v-if="company.showDeliveryCreator">
              <td colspan="11" style="border: 0;">
              <td colspan="13" style="border: 0;">
                <div style="display:flex;" class="bottom">
                  架子&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;只&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  {{takeCare}}
@@ -337,7 +342,7 @@
              </td>
            </tr>
            <tr class="day-in" style="border: 0;">
              <td colspan="11" style="border: 0;">
              <td colspan="13" style="border: 0;">
                <div style="display:flex;text-align: left;border: 0;margin-top: 10px " class="bottom" >
                  <el-input type="textarea" :autosize="{ minRows: 7, maxRows: 20 }" v-model="remark"/>
                </div>
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet4.vue
@@ -215,11 +215,13 @@
            <template v-for="(item, index) in itme1.data" :key="index" >
              <thead>
              <tr v-if="index===0">
                <th style="width: 14%;" colspan="3">宽X高</th>
                <th style="width: 9%;">楼层编号</th>
                <th style="width: 14%;" colspan="2">宽X高</th>
                <th style="width: 8%;">数量</th>
                <th style="width: 9%;">面积</th>
                <th style="width: 1%;"></th>
                <th style="width: 14%;" colspan="3">宽X高</th>
                <th style="width: 9%;">楼层编号</th>
                <th style="width: 14%;" colspan="2">宽X高</th>
                <th style="width: 8%;">数量</th>
                <th style="width: 9%;">面积</th>
              </tr>
@@ -234,7 +236,8 @@
              <tr class="day-in" v-for="(group, groupIndex) in item.groupedDeliveryDetails" :key="groupIndex">
                <!-- 第一列数据(组内第一条) -->
                <td style="font-size: 15px;font-weight: bold;" colspan="3">
                <td>{{ group[0].buildingNumber }}</td>
                <td style="font-size: 15px;font-weight: bold;" colspan="2">
                  {{ group[0].parsedOtherColumns?.S02 ? `(${group[0].parsedOtherColumns.S02})` : '' }}
                  {{ group[0].width }}x{{ group[0].height }}
                </td>
@@ -243,7 +246,8 @@
                <td></td> <!-- 分隔列 -->
                <!-- 第二列数据(组内第二条,若存在) -->
                <td style="font-size: 15px;font-weight: bold;" colspan="3" v-if="group[1]">
                <td v-if="group[1]">{{ group[1].buildingNumber }}</td>
                <td style="font-size: 15px;font-weight: bold;" colspan="2" v-if="group[1]">
                  {{ group[1].parsedOtherColumns?.S02 ? `(${group[1].parsedOtherColumns.S02})` : '' }}
                  {{ group[1].width }}x{{ group[1].height }}
                </td>
north-glass-erp/northglass-erp/src/router/index.js
@@ -755,11 +755,7 @@
              name: 'selectMachine',
              component: () => import('../views/pp/machine/SelectMachine.vue'),
            },
            {
              path: 'addMachine',
              name: 'addMachine',
              component: () => import('../views/pp/machine/AddMachine.vue'),
            },
            {
              path: 'maintenanceAndRepair',
              name: 'maintenanceAndRepair',
@@ -941,6 +937,11 @@
              component: () => import('../views/pp/productionBasicData/AddTeamGroup.vue'),
            },
            {
              path: 'addMachine',
              name: 'addMachine',
              component: () => import('../views/pp/productionBasicData/AddMachine.vue'),
            },
            {
              path: '',
              redirect:'/main/productionBasicData/selectProductionBasicData'
            }
north-glass-erp/northglass-erp/src/stores/sd/order/orderInfo.js
@@ -14,6 +14,7 @@
        reportingWorkDate:ref(["",""]),
        qualityInspectionDate:ref(["",""]),
        brokenDate:ref(["",""]),
        yieldDate:ref(["",""]),
        searchOrderListFilter:ref([]),//订单首页筛选]
        searchOrderFilter:{
            list:ref([]),
@@ -81,6 +82,9 @@
            this.reportFormDate=["",""]
            this.workOrderDate=["",""]
            this.reportingWorkDate=["",""]
            this.qualityInspectionDate=["",""]
            this.brokenDate=["",""]
            this.yieldDate=["",""]
            this.searchOrderFilter={
                list:[],
                data:{}
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/ProjectCreate.vue
@@ -261,6 +261,7 @@
              ElMessage.success(config.successMsg);
            }
          });
          return;
        }
        // 添加确认提示弹窗,询问用户是否进行当前操作
        ElMessageBox.confirm('是否进行当前操作?', '确认操作', {
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/OptimizationRect.vue
@@ -53,10 +53,6 @@
            class="layout-glassDetail"
            :style="rectStyle(glassDetail, layoutIndex)"
            @contextmenu.prevent="handleRectRightClick(layoutIndex, rectIndex)"
            @mousedown="handleRectDragStart(layoutIndex, rectIndex)"
            @mousemove="handleRectDragging"
            @mouseup="handleRectDragEnd"
            @mouseleave="handleRectDragEnd"
            @click="handleRectClick(layoutIndex, rectIndex)"
          >
            <div class="glassDetail-content">
@@ -108,9 +104,9 @@
const rectClass = ref('layout-glassDetail');
const selectedLayoutIndex = ref(0);
const currentRect = ref(null);
const dragging = ref(false);
const dragStartPos = ref({ x: 0, y: 0 });
const dragRect = ref(null);
// const dragging = ref(false);
// const dragStartPos = ref({ x: 0, y: 0 });
// const dragRect = ref(null);
const showJiaHao = ref(false);
const showProcessId = ref(false);
const themeColor = ref(null);
@@ -257,6 +253,12 @@
  return bestFit;
};
const isSelected = (layoutIndex, rectIndex) => {
  return focusIndex.value &&
         focusIndex.value.layoutIndex === layoutIndex &&
         focusIndex.value.rectIndex === rectIndex;
};
//版图内容样式加载
const layoutContainerStyle = (layoutIndex) => {
  const layout = layouts.value[layoutIndex];
@@ -308,9 +310,10 @@
//版图内容小片样式加载
const rectStyle = (glassDetail, layoutIndex) => {
  const layout = layouts.value[layoutIndex];
  const scale = Math.min(0.25
  );
  return {
  const scale = Math.min(0.25);
  const isSelectedRect = isSelected(layoutIndex, layout.glassDetails.indexOf(glassDetail));
  let style = {
    position: 'absolute',
    left: `${glassDetail.x * scale}px`,
    top: `${glassDetail.y * scale}px`,
@@ -322,13 +325,21 @@
    draggable: !glassDetail.isRemain,
    zIndex: glassDetail.isRemain ? 1 : 2
  };
  // 如果被选中,则添加内侧红框
  if (isSelectedRect) {
    style.boxShadow = 'inset 0 0 0 2px red';
  }
  return style;
};
const rectStyle1 = (glassDetail, layoutIndex) => {
  const layout = layouts.value[layoutIndex];
  const scale = Math.min(0.25
  );
  return {
  const scale = Math.min(0.25);
  const isSelectedRect = isSelected(layoutIndex, layout.glassDetails.indexOf(glassDetail));
  let style = {
    position: 'absolute',
    left: `${glassDetail.x * scale}px`,
    top: `${glassDetail.y * scale}px`,
@@ -340,10 +351,21 @@
    draggable: !glassDetail.isRemain,
    zIndex: glassDetail.isRemain ? 1 : 2
  };
  // 如果被选中,则添加内侧红框
  if (isSelectedRect) {
    style.boxShadow = 'inset 0 0 0 2px red';
  }
  return style;
};
//点击小片
const handleRectClick = (layoutIndex, rectIndex) => {
  // if (dragging.value) {
  //   return;
  // }
  focusIndex.value = { layoutIndex, rectIndex };
  emit('rectClicked', layoutIndex, rectIndex);
};
@@ -352,12 +374,13 @@
const handleRectRightClick = (layoutIndex, rectIndex) => {
  const glassDetail = layouts.value[layoutIndex].glassDetails[rectIndex];
  if (glassDetail.isRemain) return;
  document.querySelectorAll('.context-menu').forEach(el => el.remove());
  const contextMenu = document.createElement('div');
  contextMenu.className = 'context-menu';
  contextMenu.style.position = 'absolute';
  contextMenu.style.left = `${event.clientX}px`;
  contextMenu.style.bottom = `${event.clientY}px`;
  contextMenu.style.top = `${event.clientY}px`;
  contextMenu.style.backgroundColor = '#fff';
  contextMenu.style.border = '1px solid #ccc';
  contextMenu.style.padding = '5px';
@@ -488,12 +511,13 @@
const handleGrayRectRightClick = (layoutIndex, rectIndex,glassDetails) => {
  //const glassDetail = glassDetails[rectIndex];
  if (!glassDetails.isRemain) return;
  document.querySelectorAll('.context-menu').forEach(el => el.remove());
  const contextMenu = document.createElement('div');
  contextMenu.className = 'context-menu';
  contextMenu.style.position = 'absolute';
  contextMenu.style.left = `${event.clientX}px`;
  contextMenu.style.bottom = `${event.clientY}px`;
  contextMenu.style.top = `${event.clientY}px`;
  contextMenu.style.backgroundColor = '#fff';
  contextMenu.style.border = '1px solid #ccc';
  contextMenu.style.padding = '5px';
@@ -531,105 +555,122 @@
};
//小片鼠标按下事件
const handleRectDragStart = (layoutIndex, rectIndex) => {
  const layout = layouts.value[layoutIndex];
  const glassDetail = layout.glassDetails[rectIndex];
  if (glassDetail.isRemain) return;
// const handleRectDragStart = (layoutIndex, rectIndex) => {
//   const layout = layouts.value[layoutIndex];
//   const glassDetail = layout.glassDetails[rectIndex];
//   if (glassDetail.isRemain) return;
//
//   dragRect.value = { layoutIndex, rectIndex };
//   dragStartPos.value = {
//     x: event.clientX,
//     y: event.clientY
//   };
// };
  dragging.value = true;
  dragRect.value = { layoutIndex, rectIndex };
  dragStartPos.value = {
    x: event.clientX,
    y: event.clientY
  };
};
// //小片鼠标移动事件
// const handleRectDragging = (event) => {
//   if (!dragRect.value) return;
//
//   // 如果还没确认是拖拽,则先判断是否达到拖拽阈值(例如5像素)
//   if (!dragging.value) {
//     const deltaX = event.clientX - dragStartPos.value.x;
//     const deltaY = event.clientY - dragStartPos.value.y;
//     const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
//
//     // 如果移动距离小于阈值,则认为是点击而非拖拽
//     if (distance < 5) {
//       return;
//     }
//
//     // 达到阈值,确认是拖拽操作
//     dragging.value = true;
//   }
//
//   const layoutIndex = dragRect.value.layoutIndex;
//   const rectIndex = dragRect.value.rectIndex;
//   const layout = layouts.value[layoutIndex];
//   const glassDetail = layout.glassDetails[rectIndex];
//
//   // 保存原始坐标用于计算偏移量
//   const originalX = glassDetail.x;
//   const originalY = glassDetail.y;
//
//   const scale = Math.min(
//     (props.gw - 100) / layout.width,
//     (props.gh - 100) / layout.height
//   );
//
//   const deltaX = event.clientX - dragStartPos.value.x;
//   const deltaY = event.clientY - dragStartPos.value.y;
//
//   const newRect = { ...glassDetail };
//   newRect.x += deltaX / scale;
//   newRect.y += deltaY / scale;
//
//   const otherRects = layout.glassDetails.filter(r => !r.isRemain && r !== glassDetail);
//   let isValidMove = true;
//
//   otherRects.forEach(otherRect => {
//     if (checkOverlap(newRect, otherRect)) {
//       isValidMove = false;
//     }
//   });
//
//   if (newRect.x < 0 || newRect.y < 0 ||
//       newRect.x + newRect.width > layout.width ||
//       newRect.y + newRect.height > layout.height) {
//     isValidMove = false;
//   }
//
//   if (isValidMove) {
//     glassDetail.x = newRect.x;
//     glassDetail.y = newRect.y;
//
//     // 更新glassPoint坐标
//     if (glassDetail.glassPoint && Array.isArray(glassDetail.glassPoint)) {
//       const offsetX = glassDetail.x - originalX;
//       const offsetY = glassDetail.y - originalY;
//
//       glassDetail.glassPoint.forEach(point => {
//         point.X += offsetX;
//         point.Y += offsetY;
//         // 添加精度控制
//         point.X = parseFloat(point.X.toFixed(2));
//         point.Y = parseFloat(point.Y.toFixed(2));
//       });
//     }
//
//     dragStartPos.value = {
//       x: event.clientX,
//       y: event.clientY
//     };
//     adjustGrayRectangles(layoutIndex);
//   }
// };
//小片鼠标移动事件
const handleRectDragging = (event) => {
  if (!dragging.value || !dragRect.value) return;
  const layoutIndex = dragRect.value.layoutIndex;
  const rectIndex = dragRect.value.rectIndex;
  const layout = layouts.value[layoutIndex];
  const glassDetail = layout.glassDetails[rectIndex];
  // 保存原始坐标用于计算偏移量
  const originalX = glassDetail.x;
  const originalY = glassDetail.y;
  const scale = Math.min(
    (props.gw - 100) / layout.width,
    (props.gh - 100) / layout.height
  );
  const deltaX = event.clientX - dragStartPos.value.x;
  const deltaY = event.clientY - dragStartPos.value.y;
  const newRect = { ...glassDetail };
  newRect.x += deltaX / scale;
  newRect.y += deltaY / scale;
  const otherRects = layout.glassDetails.filter(r => !r.isRemain && r !== glassDetail);
  let isValidMove = true;
  otherRects.forEach(otherRect => {
    if (checkOverlap(newRect, otherRect)) {
      isValidMove = false;
    }
  });
  if (newRect.x < 0 || newRect.y < 0 ||
      newRect.x + newRect.width > layout.width ||
      newRect.y + newRect.height > layout.height) {
    isValidMove = false;
  }
  if (isValidMove) {
    glassDetail.x = newRect.x;
    glassDetail.y = newRect.y;
    // 更新glassPoint坐标
    if (glassDetail.glassPoint && Array.isArray(glassDetail.glassPoint)) {
      const offsetX = glassDetail.x - originalX;
      const offsetY = glassDetail.y - originalY;
      glassDetail.glassPoint.forEach(point => {
        point.X += offsetX;
        point.Y += offsetY;
        // 添加精度控制
        point.X = parseFloat(point.X.toFixed(2));
        point.Y = parseFloat(point.Y.toFixed(2));
      });
    }
    dragStartPos.value = {
      x: event.clientX,
      y: event.clientY
    };
    adjustGrayRectangles(layoutIndex);
  }
};
//小片鼠标松开事件
const handleRectDragEnd = () => {
  if (dragRect.value) {
    const layoutIndex = dragRect.value.layoutIndex;
    const rectIndex = dragRect.value.rectIndex;
    const glassDetail = layouts.value[layoutIndex].glassDetails[rectIndex];
    const layout = layouts.value[layoutIndex];
    const scale = Math.min(
      (props.gw - 100) / layout.width,
      (props.gh - 100) / layout.height
    );
    glassDetail.x = parseFloat(glassDetail.x.toFixed(2));
    glassDetail.y = parseFloat(glassDetail.y.toFixed(2));
    adjustAlignmentPosition(layoutIndex, rectIndex);
  }
  dragging.value = false;
  dragRect.value = null;
};
// //小片鼠标松开事件
// const handleRectDragEnd = () => {
//   dragging.value = false;
//   dragRect.value = null;
//   dragStartPos.value = { x: 0, y: 0 };
//   if (dragRect.value) {
//     const layoutIndex = dragRect.value.layoutIndex;
//     const rectIndex = dragRect.value.rectIndex;
//     const glassDetail = layouts.value[layoutIndex].glassDetails[rectIndex];
//     const layout = layouts.value[layoutIndex];
//     const scale = Math.min(
//       (props.gw - 100) / layout.width,
//       (props.gh - 100) / layout.height
//     );
//
//     glassDetail.x = parseFloat(glassDetail.x.toFixed(2));
//     glassDetail.y = parseFloat(glassDetail.y.toFixed(2));
//     adjustAlignmentPosition(layoutIndex, rectIndex);
//   }
//
//   dragging.value = false;
//   dragRect.value = null;
// };
const adjustAlignmentPosition = (layoutIndex, rectIndex) => {
  const layout = layouts.value[layoutIndex];
north-glass-erp/northglass-erp/src/views/pp/machine/Machine.vue
@@ -20,7 +20,7 @@
    <div id="div-title">
      <el-breadcrumb :separator-icon="ArrowRight">
        <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/machine/selectMachine' }">{{$t('machine.equipmentSituation')}}</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/machine/addMachine' }">{{$t('machine.equipmentAddition')}}</el-breadcrumb-item>
<!--        <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/machine/addMachine' }">{{$t('machine.equipmentAddition')}}</el-breadcrumb-item>-->
        <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/machine/maintenanceAndRepair' }">{{$t('machine.maintenanceAndRepair')}}</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/machine/addMaintenanceAndRepair' }">{{$t('machine.maintenanceAndRepairAddition')}}</el-breadcrumb-item>
        <el-breadcrumb-item  style="display: none" />
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue
@@ -14,6 +14,7 @@
import {VXETable} from "vxe-table";
import  useUserInfoStore from '@/stores/userInfo'
import {useI18n} from "vue-i18n";
import { computed } from 'vue'
import UpdateOrderCraft from "@/components/sd/order/UpdateOrderCraft.vue";
import {filterChanged} from "@/hook";
let productGlassTypeStore = useProductGlassTypeStore()
@@ -78,20 +79,40 @@
const saveCraft = () => {
  //rowIndex.value.process = craftObj.newCraft.join('->')
 let orderProcess= craftObj.newCraft.join('->')
  request.post(`/processCard/updateProcess/${rowIndex.value.process_id}/${rowIndex.value.order_number}/${rowIndex.value.technology_number}/${rowIndex.value.order_id}/${orderProcess}`, craftObj).then((res) => {
    if (res.code == 200 && res.data === true) {
      ElMessage.success(t('basicData.msg.saveSuccess'))
      router.push({
        path: '/main/processCard/SelectDetailProcessCard',
        query: {processId: processId,random: Math.random()}
      })
    } else {
  //获取差异工序
  const diffCraft = computed(() => {
    return [
      ...craftObj.oldCraft.filter(item => !craftObj.newCraft.includes(item)), //删除
      ...craftObj.newCraft.filter(item => !craftObj.oldCraft.includes(item))//增加
    ]
  })
  if (diffCraft.value == '') {//无变化不执行后续
    return
  }
  //获取最新报工工序的顺序
request.post(`/processCard/getNewProcess/${rowIndex.value.process_id}/${rowIndex.value.order_number}/${rowIndex.value.technology_number}/${diffCraft.value}`).then((res) => {
    if (res.code == 200 ) {
      if (res.data){
        request.post(`/processCard/updateProcess/${rowIndex.value.process_id}/${rowIndex.value.order_number}/${rowIndex.value.technology_number}/${rowIndex.value.order_id}/${orderProcess}`, craftObj).then((res) => {
          if (res.code == 200 && res.data === true) {
            ElMessage.success(t('basicData.msg.saveSuccess'))
            router.push({
              path: '/main/processCard/SelectDetailProcessCard',
              query: {processId: processId,random: Math.random()}
            })
          } else {
      ElMessage.warning(t('processCard.updateProcessMsg'))
            ElMessage.warning(t('processCard.updateProcessMsg'))
          }
        })
        craftVisible.value= false
      }else {
        ElMessage.warning(t('processCard.updateProcessMsg'))
      }
    }
  })
  craftVisible.value= false
}
north-glass-erp/northglass-erp/src/views/pp/productionBasicData/AddMachine.vue
File was renamed from north-glass-erp/northglass-erp/src/views/pp/machine/AddMachine.vue
@@ -142,7 +142,7 @@
              ElMessage.success(t('basicData.msg.saveSuccess'))
              //router.push('/main/processCard/SplittingDetails?orderId=${orderId}')
              router.push({
                path: '/main/machine/AddMachine',
                path: '/main/productionBasicData/AddMachine',
                query: {random: Math.random()}
              })
north-glass-erp/northglass-erp/src/views/pp/productionBasicData/ProductionBasicData.vue
@@ -23,7 +23,8 @@
        <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/productionBasicData/addBreakageType' }">{{$t('productionBasicData.newTypeOfSecondaryDamageAdded')}}</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/productionBasicData/addBreakageReason' }">{{$t('productionBasicData.reasonForSecondaryFailureAdded')}}</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/productionBasicData/addTeamGroup' }">{{$t('productionBasicData.teamAdditionAndAddition')}}</el-breadcrumb-item>
<!--        <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/productionBasicData/AddMaintenanceAndRepair' }">班组人员新增新增</el-breadcrumb-item>-->
        <el-breadcrumb-item @click="changeRouter(5)" :class="indexFlag===5?'indexTag':''" :to="{ path: '/main/productionBasicData/addMachine' }">{{$t('machine.equipmentAddition')}}</el-breadcrumb-item>
        <!--        <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/productionBasicData/AddMaintenanceAndRepair' }">班组人员新增新增</el-breadcrumb-item>-->
        <el-breadcrumb-item  style="display: none" />
      </el-breadcrumb>
    </div>
north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue
@@ -11,6 +11,11 @@
import dayjs from 'dayjs'
import {addListener} from "@/hook/mouseMove";
import {VxeUI} from "vxe-pc-ui";
import companyInfo from "@/stores/sd/companyInfo";
import useOrderInfoStore from "@/stores/sd/order/orderInfo";
const company = companyInfo()
const reportTime=company.reportTime
const orderInfo = useOrderInfoStore()
//语言获取
const {t} = useI18n()
let router = useRouter()
@@ -58,39 +63,9 @@
let pageNum = ref(1)
let pageState = null
//获取七天前到当前时间
function getNowTime() {
  const pad = (n) => n.toString().padStart(2, '0');
  const formatDate = (date) => {
    const year = date.getFullYear();
    const month = pad(date.getMonth() + 1);
    const day = pad(date.getDate());
    return `${year}-${month}-${day} 08:00:00`;
  };
  const now = new Date();
  const startDate = new Date(now.getTime() - 3600 * 1000 * 24 * 3); // 三天前
  const start = formatDate(startDate);
  const end = formatDate(now);
  return [start, end];
}
//第一次加载获取近七天时间和默认状态
form.date1 = getNowTime()
let startTime = form.date1[0]
let endTime = form.date1[1]
let date = new Date(endTime); // 将日期字符串转为 Date 对象
// 使用 setDate 方法加一天
date.setDate(date.getDate() + 1);
const pad = (n) => n.toString().padStart(2, '0');
let year = date.getFullYear();
let month = pad(date.getMonth() + 1);
let day = pad(date.getDate());
let newEndTime = `${year}-${month}-${day} 08:00:00`;
let selectProcesses = value.value
let total = reactive({
  pageTotal: 0,
@@ -102,87 +77,44 @@
  processType: [],
})
//第一次加载数据
request.post(`/report/yield/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => {
request.post(`/report/yield/${orderInfo.yieldDate}/${selectProcesses}/${reportTime}`, filterData.value).then((res) => {
  if (res.code == 200) {
    // total.dataTotal = res.data.total.total*1
    // total.pageTotal= res.data.total.pageTotal
    // pageTotal.value = res.data.total
    produceList = produceList.value.concat(deepClone(res.data.data))
    titleSelectJson.value.processType = res.data.process
    orderInfo.yieldDate = res.data.selectDate
    xGrid.value.reloadData(produceList)
    gridOptions.loading = false
  } else {
    gridOptions.loading = false
    ElMessage.warning(res.msg)
  }
})
//页脚翻页查询
const selectPageList = () => {
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  request.post(`/report/yield/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => {
    if (res.code == 200) {
      produceList = deepClone(res.data.data)
      xGrid.value.reloadData(produceList)
    } else {
      ElMessage.warning(res.msg)
    }
  })
}
//点击查询
const getWorkOrder = () => {
  gridOptions.loading = true
  // 原始 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);
  }
  if (rawEnd.getHours() === 8 || rawEnd.getHours() === 0) {
    rawEnd.setHours(8, 0, 0, 0);
  }
  const startTime = formatDateTime(rawStart);
  const endPlusOne = new Date(rawEnd);
  endPlusOne.setDate(endPlusOne.getDate());
  const newEndTime = formatDateTime(endPlusOne);
  form.date1 = [startTime, newEndTime];
  let selectProcesses = value.value
  request.post(`/report/yield/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => {
  console.log(orderInfo.yieldDate)
  console.log(reportTime)
  request.post(`/report/yield/${orderInfo.yieldDate}/${selectProcesses}/${reportTime}`, filterData.value).then((res) => {
    if (res.code == 200) {
      // total.dataTotal = res.data.total.total*1
      // total.pageTotal= res.data.total.pageTotal
      // pageTotal.value = res.data.total
      orderInfo.yieldDate = res.data.selectDate
      produceList = deepClone(res.data.data)
      xGrid.value.reloadData(produceList)
      gridOptions.loading = false
    } else {
      gridOptions.loading = false
      ElMessage.warning(res.msg)
    }
  })
}
const formatDateTime = (date) => {
  const year = date.getFullYear();
  const month = pad(date.getMonth() + 1);
  const day = pad(date.getDate());
  const hour = pad(date.getHours());
  const minute = pad(date.getMinutes());
  return `${year}-${month}-${day} ${hour}:${minute}:00`;
};
//页脚跳转
const handlePageChange = ({currentPage, pageSize}) => {
  pageNum.value = currentPage
  total.pageTotal = pageSize
  selectPageList()
}
@@ -383,13 +315,13 @@
  <div  style="width: 100%;height: 100%">
    <div class="head">
        <el-date-picker
            v-model="form.date1"
            v-model="orderInfo.yieldDate"
            :start-placeholder="$t('basicData.startDate')"
            :end-placeholder="$t('basicData.endDate')"
            format="YYYY/MM/DD HH:mm"
            style="width: 350px"
            type="daterange"
            value-format="YYYY/MM/DD HH:mm"
            format="YYYY/MM/DD HH:mm"
            value-format="YYYY-MM-DD HH:mm"
        />
        &nbsp;&nbsp;
        <el-select v-model="value" clearable default-value="default_city" style="width: 120px">
north-glass-erp/northglass-erp/src/views/pp/report/YieldProcess.vue
@@ -11,6 +11,11 @@
import dayjs from 'dayjs'
import {VxeUI} from "vxe-pc-ui";
import {addListener} from "@/hook/mouseMove";
import companyInfo from "@/stores/sd/companyInfo";
import useOrderInfoStore from "@/stores/sd/order/orderInfo";
const company = companyInfo()
const reportTime=company.reportTime
const orderInfo = useOrderInfoStore()
//语言获取
const {t} = useI18n()
let router = useRouter()
@@ -58,133 +63,47 @@
let pageNum = ref(1)
let pageState = null
//获取七天前到当前时间
function getNowTime() {
  const pad = (n) => n.toString().padStart(2, '0');
  const formatDate = (date) => {
    const year = date.getFullYear();
    const month = pad(date.getMonth() + 1);
    const day = pad(date.getDate());
    return `${year}-${month}-${day} 08:00:00`;
  };
  const now = new Date();
  const startDate = new Date(now.getTime() - 3600 * 1000 * 24 * 3); // 三天前
  const start = formatDate(startDate);
  const end = formatDate(now);
  return [start, end];
}
//第一次加载获取近七天时间和默认状态
form.date1 = getNowTime()
let startTime = form.date1[0]
let endTime = form.date1[1]
let date = new Date(endTime); // 将日期字符串转为 Date 对象
// 使用 setDate 方法加一天
date.setDate(date.getDate() + 1);
const pad = (n) => n.toString().padStart(2, '0');
let year = date.getFullYear();
let month = pad(date.getMonth() + 1);
let day = pad(date.getDate());
let newEndTime = `${year}-${month}-${day} 08:00:00`;
let selectProcesses = value.value
let total = reactive({
  pageTotal: 0,
  dataTotal: 0,
  pageSize: 100
})
//定义接收加载表头下拉数据
const titleSelectJson = ref({
  processType: [],
})
//第一次加载数据
request.post(`/report/yieldProcess/${startTime}/${newEndTime}`, filterData.value).then((res) => {
request.post(`/report/yieldProcess/${orderInfo.yieldDate}/${reportTime}`, filterData.value).then((res) => {
  if (res.code == 200) {
    // total.dataTotal = res.data.total.total*1
    // total.pageTotal= res.data.total.pageTotal
    // pageTotal.value = res.data.total
    orderInfo.yieldDate = res.data.selectDate
    produceList = produceList.value.concat(deepClone(res.data.data))
    titleSelectJson.value.processType = res.data.process
    xGrid.value.reloadData(produceList)
    gridOptions.loading = false
  } else {
    gridOptions.loading = false
    ElMessage.warning(res.msg)
  }
})
//页脚翻页查询
const selectPageList = () => {
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  request.post(`/report/yield/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => {
    if (res.code == 200) {
      produceList = deepClone(res.data.data)
      xGrid.value.reloadData(produceList)
    } else {
      ElMessage.warning(res.msg)
    }
  })
}
//点击查询
const getWorkOrder = () => {
  gridOptions.loading = true
  // 原始 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);
  }
  if (rawEnd.getHours() === 8 || rawEnd.getHours() === 0) {
    rawEnd.setHours(8, 0, 0, 0);
  }
  const startTime = formatDateTime(rawStart);
  const endPlusOne = new Date(rawEnd);
  endPlusOne.setDate(endPlusOne.getDate());
  const newEndTime = formatDateTime(endPlusOne);
  form.date1 = [startTime, newEndTime];
  let selectProcesses = value.value
  request.post(`/report/yieldProcess/${startTime}/${newEndTime}`, filterData.value).then((res) => {
  request.post(`/report/yieldProcess/${orderInfo.yieldDate}/${reportTime}`, filterData.value).then((res) => {
    if (res.code == 200) {
      // total.dataTotal = res.data.total.total*1
      // total.pageTotal= res.data.total.pageTotal
      // pageTotal.value = res.data.total
      orderInfo.yieldDate = res.data.selectDate
      produceList = deepClone(res.data.data)
      xGrid.value.reloadData(produceList)
      gridOptions.loading = false
    } else {
      gridOptions.loading = false
      ElMessage.warning(res.msg)
    }
  })
}
const formatDateTime = (date) => {
  const year = date.getFullYear();
  const month = pad(date.getMonth() + 1);
  const day = pad(date.getDate());
  const hour = pad(date.getHours());
  const minute = pad(date.getMinutes());
  return `${year}-${month}-${day} ${hour}:${minute}:00`;
};
//页脚跳转
const handlePageChange = ({currentPage, pageSize}) => {
  pageNum.value = currentPage
  total.pageTotal = pageSize
  selectPageList()
}
/*使用筛选,后端获取数据*/
// const changeFilterEvent = (event, option, $panel,) => {
@@ -342,15 +261,15 @@
<template>
  <div  style="width: 100%;height: 100%">
    <div class="head">
        <el-date-picker
            v-model="form.date1"
            :start-placeholder="$t('basicData.startDate')"
            :end-placeholder="$t('basicData.endDate')"
            format="YYYY/MM/DD HH:mm"
            style="width: 350px"
            type="daterange"
            value-format="YYYY/MM/DD HH:mm"
        />
      <el-date-picker
          v-model="orderInfo.yieldDate"
          :start-placeholder="$t('basicData.startDate')"
          :end-placeholder="$t('basicData.endDate')"
          style="width: 350px"
          type="daterange"
          format="YYYY/MM/DD HH:mm"
          value-format="YYYY-MM-DD HH:mm"
      />
        &nbsp;&nbsp;
        <el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button>
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -450,6 +450,15 @@
    }
    @ApiOperation("获取最报工新工序")
    @PostMapping("/getNewProcess/{processId}/{orderNumber}/{technologyNumber}/{orderProcess}")
    public Result getNewProcess(@PathVariable String processId,
                                @PathVariable String orderNumber,
                                @PathVariable String technologyNumber,
                                @PathVariable List<String> orderProcess){
        return Result.success(flowCardService.getNewProcessSv(processId,orderNumber,technologyNumber,orderProcess));
    }
    @ApiOperation("修改工艺流程")
    @PostMapping("/updateProcess/{processId}/{orderNumber}/{technologyNumber}/{orderId}/{process}")
    public Result updateProcess(
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
@@ -140,23 +140,23 @@
    }
    @ApiOperation("成品率报表")
    @PostMapping("/yield/{selectTime1}/{selectTime2}/{selectProcesses}")
    @PostMapping("/yield/{selectDate}/{selectProcesses}/{reportTime}")
    public Result yield(
            @PathVariable String selectTime1,
            @PathVariable String selectTime2,
            @PathVariable List<String> selectDate,
            @PathVariable String selectProcesses,
            @PathVariable String reportTime,
            @RequestBody Report report) {
        return Result.success(reportService.yieldSv(selectTime1, selectTime2, selectProcesses, report));
        return Result.success(reportService.yieldSv(selectDate, selectProcesses,reportTime, report));
    }
    @ApiOperation("成品率工序汇总报表")
    @PostMapping("/yieldProcess/{selectTime1}/{selectTime2}")
    @PostMapping("/yieldProcess/{selectDate}/{reportTime}")
    public Result yieldProcess(
            @PathVariable String selectTime1,
            @PathVariable String selectTime2,
            @PathVariable List<String> selectDate,
            @PathVariable String reportTime,
            @RequestBody Report report) {
        return Result.success(reportService.yieldProcessSv(selectTime1, selectTime2, report));
        return Result.success(reportService.yieldProcessSv(selectDate,reportTime, report));
    }
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -1,6 +1,5 @@
package com.example.erp.mapper.pp;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.erp.dto.pp.FlowCardDTO;
import com.example.erp.entity.pp.FlowCard;
@@ -298,4 +297,8 @@
    Boolean updateTerminationStatus(String processId, Integer orderNumber);
    Boolean updateTerminationNoMp(String processId, Integer orderNumber);
    List<Map<String, Object>> getNewProcessMp(String processId, String orderNumber, String technologyNumber);
    Map<String, Object> getProcessInfo( String processName);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -33,7 +33,6 @@
import java.io.IOException;
import java.sql.Date;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@@ -1354,11 +1353,13 @@
            }
            //将原来已报工的数据更新
            if (resultList != null && !resultList.isEmpty()) {
                for (OrderProcessDetail d : resultList) {
                    flowCardMapper.updateOrderProcessDetail(d.getProcessId(),d.getOrderNumber(),d.getTechnologyNumber(),
                            d.getReportingWorkNumCount(),d.getReportingWorkNum(),d.getBrokenNum(),d.getProcess());
                for (String number : numberList) {
                    for (OrderProcessDetail d : resultList) {
                        flowCardMapper.updateOrderProcessDetail(d.getProcessId(),number,d.getTechnologyNumber(),
                                d.getReportingWorkNumCount(),d.getReportingWorkNum(),d.getBrokenNum(),d.getProcess());
                    }
                }
            }
            return true;
@@ -1758,6 +1759,33 @@
    }
    public boolean getNewProcessSv(String processId, String orderNumber, String technologyNumber, List<String> orderProcess) {
        // 获取最新报工工序
        List<Map<String, Object>> newProcess = flowCardMapper.getNewProcessMp(processId, orderNumber, technologyNumber);
        if (newProcess == null || newProcess.isEmpty()) {
            return false; // 找不到标准值
        }
        // 最新工序排序号
        int standardSort = Integer.parseInt(newProcess.get(0).get("sort").toString());
        // 循环 orderProcess 的每一个工序,查询它们的 sort
        for (String processName : orderProcess) {
            Map<String, Object> data = flowCardMapper.getProcessInfo(processName);
            if (data == null) {
                return false; // 工序查不到
            }
            int orderSort = Integer.parseInt(data.get("sort").toString());
            // orderSort 必须 > standardSort
            if (orderSort <= standardSort) {
                return false;
            }
        }
        return true;
    }
}
north-glass-erp/src/main/java/com/example/erp/service/pp/GlassOptimizeService.java
@@ -47,7 +47,7 @@
    @Autowired
    SysErrorService sysErrorService;
    @Value("${mesIp:localhost}")  // 注入mesIp配置,默认值为10.153.19.31
    @Value("${mesIp:localhost}")
    private String mesIp;
    RabbitMQUtil rabbitMQUtil;
@@ -1256,6 +1256,7 @@
    public Boolean issuingProjects(String projectNo) throws JsonProcessingException {
        boolean  saveState=false;
        try {
            System.out.println(mesIp);
            // 1. 创建URL对象
            URL url = new URL("http://" + mesIp + ":88/api/loadGlass/engineering/importEngineer");
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -692,10 +692,27 @@
        return map;
    }
    public Map<String, Object> yieldSv(String selectTime1, String selectTime2, String selectProcesses, Report report) {
    public Map<String, Object> yieldSv(List<String> selectDate, String selectProcesses,String reportTime, Report report) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", reportMapper.yieldMp(selectTime1, selectTime2, selectProcesses, report));
        // 默认时间范围:过去 7 天(日期 + reportTime)
        String startDate = toReportTime(LocalDate.now().minusDays(7).toString(), reportTime);
        String endDate   = toReportTime(LocalDate.now().toString(), reportTime);
        // 如果前端传了时间,就用前端日期 + reportTime
        if (selectDate != null && selectDate.size() == 2) {
            if (selectDate.get(0) != null && !selectDate.get(0).isEmpty()) {
                startDate = toReportTime(selectDate.get(0), reportTime);
            }
            if (selectDate.get(1) != null && !selectDate.get(1).isEmpty()) {
                endDate = toReportTime(selectDate.get(1), reportTime);
            }
        }
        map.put("data", reportMapper.yieldMp(startDate, endDate, selectProcesses, report));
        map.put("process", productionSchedulingMapper.selectProcess());
        List<String> list = new ArrayList<>();
        list.add(startDate);
        list.add(endDate);
        map.put("selectDate",list);
        return map;
    }
@@ -1643,10 +1660,27 @@
        return map;
    }
    public Map<String, Object> yieldProcessSv(String selectTime1, String selectTime2, Report report) {
    public Map<String, Object> yieldProcessSv(List<String> selectDate,String reportTime, Report report) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", reportMapper.yieldProcessMp(selectTime1, selectTime2, report));
        // 默认时间范围:过去 7 天(日期 + reportTime)
        String startDate = toReportTime(LocalDate.now().minusDays(7).toString(), reportTime);
        String endDate   = toReportTime(LocalDate.now().toString(), reportTime);
        // 如果前端传了时间,就用前端日期 + reportTime
        if (selectDate != null && selectDate.size() == 2) {
            if (selectDate.get(0) != null && !selectDate.get(0).isEmpty()) {
                startDate = toReportTime(selectDate.get(0), reportTime);
            }
            if (selectDate.get(1) != null && !selectDate.get(1).isEmpty()) {
                endDate = toReportTime(selectDate.get(1), reportTime);
            }
        }
        map.put("data", reportMapper.yieldProcessMp(startDate, endDate, report));
        map.put("process", productionSchedulingMapper.selectProcess());
        List<String> list = new ArrayList<>();
        list.add(startDate);
        list.add(endDate);
        map.put("selectDate",list);
        return map;
    }
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -3911,4 +3911,16 @@
    <update id="updateTerminationNoMp">
        update pp.flow_card set termination_status=0 , termination_quantity=0 where process_id = #{processId} and order_number = #{orderNumber}
    </update>
    <select id="getNewProcessMp">
        select opd.process,bd.sort  from sd.order_process_detail as opd
            left join sd.basic_data as bd on bd.basic_name = opd.process and bd.basic_category='process'
        where opd.process_id=#{processId} and opd.order_number=#{orderNumber}
          and opd.technology_number = #{technologyNumber} and reporting_work_num_count>0 ORDER BY opd.id DESC LIMIT 1
    </select>
    <select id="getProcessInfo">
        select basic_name as process,sort FROM sd.basic_data as bd
        where bd.basic_category='process' and bd.basic_name = #{processName}
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
@@ -1570,7 +1570,7 @@
            x_axis = #{detail.x},
            y_axis = #{detail.y}
        WHERE
            project_no = #{processId} AND polys_id = #{detail.polySort}
            project_no = #{processId} AND polys_id = #{detail.polySort} AND stock_id = #{detail.stockSort}
    </update>
    <update id="updateProjectOptimize">
        update pp.optimize_project as p
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -1704,6 +1704,7 @@
    </select>
    <select id="teamOutputMp" resultMap="teamOutputMap">
        SELECT
        t.*,
        -- 玻璃总厚度(mm)
@@ -1852,39 +1853,84 @@
    <select id="exportTeamOutputMp">
        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
        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,
        --         GROUP_CONCAT(ogd.glass_child SEPARATOR '+') as workProcessName
        CASE
        WHEN LOCATE('step',#{laminating})>0 THEN GROUP_CONCAT(ogd.glass_child SEPARATOR '+')
        ELSE MAX( ogd.glass_child )
        WHEN LOCATE('step', #{laminating}) > 0 THEN GROUP_CONCAT(ogd.glass_child SEPARATOR '+')
        ELSE MAX(ogd.glass_child)
        END AS workProcessName,
        o.batch
        FROM
        reporting_work as rw left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id
        left join 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 >= #{date[0]}
        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;= #{date[0]}
        AND rw.reporting_work_time &lt;  #{date[1]}
        and position(#{process} in rw.this_process)
        <choose>
            <!-- 有传工序:精确匹配 -->
            <when test="process != null and process != ''">
                AND rw.this_process = #{process}
            </when>
            <!-- 未传工序:不加限制,查所有) -->
            <otherwise>
            </otherwise>
        </choose>
        <choose>
            <when test="laminating == ''">
                GROUP BY
@@ -1897,7 +1943,7 @@
            </when>
            <otherwise>
                GROUP BY
                <if test="laminating == 'stepA' || laminating == 'stepC'" >
                <if test="laminating == 'stepA' || laminating == 'stepC'">
                    ogd.`group`,
                </if>
                rw.reporting_work_id,
@@ -1907,12 +1953,13 @@
                rwd.order_number
            </otherwise>
        </choose>
        ) t
        ORDER BY
        rw.this_process,
        rw.process_id,
        rwd.order_number,
        rw.reporting_work_time,
        rw.teams_groups_name
        t.this_process,
        t.process_id,
        t.order_number,
        t.reporting_work_time,
        t.teams_groups_name
    </select>
    <select id="teamOutputPageTotal">
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml
@@ -293,7 +293,7 @@
            </if>
        </where>
        order by dd.id
        order by dd.box_no,dd.order_id,dd.order_number
    </select>
    <select id="getSelectShippingOrderDetailPageTotal">