guoyujie
2025-07-15 35706002455c370eca21e177b95e39cff78f8f5b
Merge branch 'master' of http://bore.pub:10439/r/ERP_override
12个文件已修改
211 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelDetails.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/router/index.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/Report.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelDetails.vue
@@ -22,7 +22,8 @@
let filterData = ref({})
const data = ref({
  printList: []
  printList: [],
  landingSequence:null
})
let props = defineProps({
@@ -32,7 +33,8 @@
  lableType:null,//标签类型
  titleList:null,//标题
  switch:null,//判断是否为新打印,
  lastList:[]
  lastList:[],
  landingSequence:null
})
const {currentRoute} = useRouter()
@@ -47,7 +49,9 @@
}
let lableType = props.lableType
let switchType = props.switch
let landingSequence = props.landingSequence
data.value.printList = JSON.parse(props.list)
data.value.landingSequence = props.landingSequence
onMounted(() => {
    request.post(`/processCard/getSelectPrintCustomLabelDetails/${type}/${lableType}`, data.value).then((res) => {
      if (res.code == 200) {
north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
@@ -45,7 +45,8 @@
  type: null,//标签模板
  lableType: null,//标签类型
  titleList:null,//标题列表
  switch:null//判断是否为新打印
  switch:null,//判断是否为新打印
  landingSequence:null//标签落架顺序打印
})
//室内室外面
@@ -114,7 +115,8 @@
  list:null,//勾选的数据
  faceOrientation:null,//内外面
  type:null,//标签模板
  lableType:null//标签类型
  lableType:null,//标签类型
  landingSequence:null
})
const printContentLabel = ref({
@@ -130,7 +132,7 @@
let type = props.type
let lableTypes = props.lableType
data.value.printList = JSON.parse(props.list)
let landingSequence = props.landingSequence
const TgaStyleSet = ref([
  {
@@ -988,6 +990,8 @@
  labelRow.value.type = type
  labelRow.value.lableType = lableType.value
  labelRow.value.switch=true
  labelRow.value.landingSequence = landingSequence
  lastList.value = []
  if (lableTypes == 1) {
@@ -1176,6 +1180,7 @@
                        :type="labelRow.type"
                        :titleList="labelRow.titleList"
                        :switch="labelRow.switch"
                        :landingSequence = "labelRow.landingSequence"
                        style="width: 100%;height: 100%"/>
  </el-dialog>
north-glass-erp/northglass-erp/src/router/index.js
@@ -551,6 +551,11 @@
              component: () => import('../views/pp/processCard/PrintProjectDetails.vue'),
            },
            {
              path: 'TagStyleDesigner',
              name: 'TagStyleDesigner',
              component: () => import('../components/pp/TagStyleDesigner.vue'),
            },
            {
              path: '',
              redirect:'/main/processCard/selectProcessCard'
            }
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
@@ -2,7 +2,7 @@
import request from "@/utils/request"
import deepClone from "@/utils/deepClone"
import {ElDatePicker, ElMessage} from "element-plus"
import {ElCheckbox, ElDatePicker, ElMessage} from "element-plus"
import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
import {useRouter} from 'vue-router'
import {useI18n} from 'vue-i18n'
@@ -50,7 +50,8 @@
  technologyNumber: null,
  process: null
})
//落架顺序
let landingSequence= ref(1)
//打印
let printRow = ref({
  list: null,
@@ -64,7 +65,8 @@
  faceOrientation: null,//内外面
  type: null,//标签模板
  lableType: null,//标签类型
  dataType: null//标签类型
  dataType: null,
  landingSequence:null
})
@@ -715,7 +717,7 @@
              id += selectRecords[i].id + "|"
            }
          }
          labelRow.value.landingSequence = landingSequence
          labelRow.value.list = JSON.stringify(selectRecords)
          labelRow.value.faceOrientation = faceOrientation
          labelRow.value.type = type
@@ -820,6 +822,10 @@
    }
  })
}
function onlandingSequenceChange(checked) {
  landingSequence.value = checked ? 0 : 1
}
</script>
<template>
@@ -856,6 +862,13 @@
            :value="item.value"
        />
      </el-select>
      &nbsp;
      <el-checkbox
          :model-value="landingSequence === 0"
          @change="onlandingSequenceChange"
      >
        {{ t('processCard.landingSequence') }}
      </el-checkbox>
    </div>
    <div class="main-table">
@@ -991,6 +1004,7 @@
                          :lableType="labelRow.lableType"
                          :list="labelRow.list"
                          :type="labelRow.type"
                          :landingSequence="labelRow.landingSequence"
                          style="width: 100%;height: 100%"/>
    </el-dialog>
north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue
@@ -59,15 +59,21 @@
//获取七天前到当前时间
function getNowTime() {
  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3)
      .toISOString()
      .replace('T', ' ')
      .slice(0, 10) //默认开始时间7天前
  const end = new Date(new Date().getTime())
      .toISOString()
      .replace('T', ' ')
      .slice(0, 10)//默认结束时间当前时间
  return [start, end]
  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];
}
@@ -89,7 +95,11 @@
let date = new Date(endTime); // 将日期字符串转为 Date 对象
// 使用 setDate 方法加一天
date.setDate(date.getDate() + 1);
let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串
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`;
//第一次加载数据
request.post(`/report/teamOutput/1/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => {
@@ -114,13 +124,21 @@
//页脚翻页查询
const selectPageList = () => {
  gridOptions.loading = true
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  let selectProcesses = procseeValue.value
  let date = new Date(endTime); // 将日期字符串转为 Date 对象
// 使用 setDate 方法加一天
  date.setDate(date.getDate() + 1);
  let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串
  const rawStart = new Date(form.date1[0]);
  const rawEnd = new Date(form.date1[1]);
  // 如果时间部分是 00:00,则设置为 08:00
  if (rawStart.getHours() === 8 || rawStart.getMinutes() === 0) {
    rawStart.setHours(8, 0, 0, 0);
  }
  if (rawEnd.getHours() === 8 || rawEnd.getMinutes() === 0) {
    rawEnd.setHours(8, 0, 0, 0);
  }
  const startTime = formatDateTime(rawStart);
  const endPlusOne = new Date(rawEnd);
  endPlusOne.setDate(endPlusOne.getDate() + 1);
  const newEndTime = formatDateTime(endPlusOne);
  const selectProcesses = procseeValue.value;
  form.date1 = [startTime, newEndTime];
  request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => {
    if (res.code == 200) {
@@ -136,17 +154,35 @@
    }
  })
}
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 getWorkOrder = () => {
  gridOptions.loading = true
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  let selectProcesses = procseeValue.value
  let date = new Date(endTime); // 将日期字符串转为 Date 对象
// 使用 setDate 方法加一天
  date.setDate(date.getDate() + 1);
  let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串
  // 原始 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.getMinutes() === 0) {
    rawStart.setHours(8, 0, 0, 0);
  }
  if (rawEnd.getHours() === 8 || rawEnd.getMinutes() === 0) {
    rawEnd.setHours(8, 0, 0, 0);
  }
  const startTime = formatDateTime(rawStart);
  const endPlusOne = new Date(rawEnd);
  endPlusOne.setDate(endPlusOne.getDate() + 1);
  const newEndTime = formatDateTime(endPlusOne);
  const selectProcesses = procseeValue.value;
  form.date1 = [startTime, newEndTime];
  request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => {
    if (res.code == 200) {
@@ -158,7 +194,6 @@
      produceList.forEach(item => {
        item.mmTotal = sumMmValues(item.workProcessName);
      });
      console.log(produceList)
      xGrid.value.loadData(produceList)
      gridOptions.loading = false
    } else {
@@ -208,12 +243,20 @@
  }
  gridOptions.loading = true
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  let date = new Date(endTime); // 将日期字符串转为 Date 对象
// 使用 setDate 方法加一天
  date.setDate(date.getDate() + 1);
  let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串
  const rawStart = new Date(form.date1[0]);
  const rawEnd = new Date(form.date1[1]);
  // 如果时间部分是 00:00,则设置为 08:00
  if (rawStart.getHours() === 8 || rawStart.getMinutes() === 0) {
    rawStart.setHours(8, 0, 0, 0);
  }
  if (rawEnd.getHours() === 8 || rawEnd.getMinutes() === 0) {
    rawEnd.setHours(8, 0, 0, 0);
  }
  const startTime = formatDateTime(rawStart);
  const endPlusOne = new Date(rawEnd);
  endPlusOne.setDate(endPlusOne.getDate() + 1);
  const newEndTime = formatDateTime(endPlusOne);
  form.date1 = [startTime, newEndTime];
  request.post(`/report/teamOutput/1/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => {
    if (res.code == 200) {
@@ -397,10 +440,10 @@
            v-model="form.date1"
            :start-placeholder="$t('basicData.startDate')"
            :end-placeholder="$t('basicData.endDate')"
            format="YYYY/MM/DD"
            style="width: 250px"
            format="YYYY/MM/DD HH:mm"
            style="width: 350px"
            type="daterange"
            value-format="YYYY-MM-DD"
            value-format="YYYY/MM/DD HH:mm"
        />
        &nbsp;&nbsp;
        <el-select v-model="procseeValue" clearable default-value="default_city" style="width: 120px">
north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
@@ -172,7 +172,6 @@
  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
    if (res.code == 200) {
      console.log(res.data.data)
      total.dataTotal = res.data.total.total * 1
      total.pageTotal = res.data.total.pageTotal
      pageTotal.value = res.data.total
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
@@ -1,6 +1,7 @@
package com.example.erp.controller.pp;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.date.DateTime;
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
import com.example.erp.dto.pp.*;
@@ -180,8 +181,8 @@
    public Result teamOutput(
            @PathVariable Integer pageNum,
            @PathVariable Integer pageSize,
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @PathVariable String selectTime1,
            @PathVariable String selectTime2,
            @PathVariable String selectProcesses,
            @RequestBody TeamOutputDTO teamOutputDTO) {
        return Result.seccess(reportService.teamOutputSv(pageNum, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO));
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
@@ -1,6 +1,7 @@
package com.example.erp.mapper.pp;
import cn.hutool.core.date.DateTime;
import com.example.erp.dto.pp.*;
import com.example.erp.entity.pp.Report;
import org.apache.ibatis.annotations.Mapper;
@@ -66,9 +67,9 @@
    List<YieldDTO> exportYieldMp(List<LocalDate> date, String process);
    List<TeamOutputDTO> teamOutputMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO);
    List<TeamOutputDTO> teamOutputMp(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO);
    Map<String, Integer> teamOutputPageTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO);
    Map<String, Integer> teamOutputPageTotal(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO);
    List<Map<String, String>> workInProgressOrderMp(Integer offset, Integer pageSize, String orderId, String inputProject, String selectProcesses, WorkInProgressDTO workInProgressDTO);
@@ -94,7 +95,7 @@
    Map<String,Float> damageReportFootSum(Date selectTime1, Date selectTime2, DamageReportDTO damageReportDTO);
    Map<String,Float> teamOutputFootSum(Date selectTime1, Date selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO);
    Map<String,Float> teamOutputFootSum(String selectTime1, String selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO);
    String getLaminating(String selectProcesses);
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -16,6 +16,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.stereotype.Service;
import java.awt.*;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
@@ -851,6 +852,10 @@
    }
    public Map<String, Object> getSelectPrintCustomLabelDetailsSv(String type, Integer lableType, Map<String, Object> object) {
        String landingSequence = "";
        if (object.get("landingSequence") != null) {
            landingSequence = object.get("landingSequence").toString();
        }
        Map<String, Object> map = new HashMap<>();
        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果
        List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
@@ -896,6 +901,26 @@
                }
            }
        }
        if (!"1".equals(landingSequence)) {
            // 构造一个先按短边、再按长边的比较器
            Comparator<Map<String,Object>> comparator = Comparator
                    .comparingDouble((Map<String,Object> m) -> {
                        Map<String,Object> first = ((List<Map<String,Object>>)m.get("data")).get(0);
                        double w = ((Number) first.get("width")).doubleValue();
                        double h = ((Number) first.get("height")).doubleValue();
                        return Math.min(w, h);
                    })
                    .thenComparingDouble(m -> {
                        Map<String,Object> first = ((List<Map<String,Object>>)m.get("data")).get(0);
                        double w = ((Number) first.get("width")).doubleValue();
                        double h = ((Number) first.get("height")).doubleValue();
                        return Math.max(w, h);
                    });
            // 对整个 list 排序,并整体反转,短边大→前,短边相同时长边大→前
            list.sort(comparator.reversed());
        }
        map.put("data", list);
        map.put("title", flowCardMapper.getPrintTitle(type));
        return map;
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -543,7 +543,7 @@
        return reportMapper.exportYieldMp(date,process);
    }
    public Map<String, Object> teamOutputSv(Integer pageNum, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO) {
    public Map<String, Object> teamOutputSv(Integer pageNum, Integer pageSize, String selectTime1, String selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO) {
        if (selectProcesses.equals("全部")){
            selectProcesses="";
        }
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -1021,7 +1021,7 @@
               ogd.glass_address,
               ogd.child_width,
               ogd.child_height,
               fc.quantity,
               sum(fc.quantity) as quantity,
               ROUND(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area,
               ifnull(fcs.sort, '')                                                 as sort,
               ogd.glass_child,
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -1168,7 +1168,6 @@
                   reporting_work as rwk
                   on rw.reporting_work_id = rwk.reporting_work_id
              where position(#{process} in rwk.this_process)
                and rwk.this_process!='切割'
                and rw.review_status >= 0
              GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c
             on c.process_id = fc.process_id
@@ -1178,7 +1177,7 @@
                           on o.order_id = od.order_id
        where  o.create_order>0
          and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
              odpd.broken_num != 0 and odpd.process!='切割'
              odpd.broken_num != 0 and odpd.process!=SUBSTRING_INDEX(ogd.process, '->', 1)
          and position(#{process} in odpd.process)
          and position(ifnull(#{inputVal}, '') in od.order_id)
          and position(ifnull(#{project}, '') in o.project)
@@ -2220,7 +2219,6 @@
                    pp.reporting_work as rwk
                   on rw.reporting_work_id = rwk.reporting_work_id
              where position(#{selectProcesses} in rwk.this_process)
        and rwk.this_process!='切割'
                and rw.review_status >= 0
              GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c
             on c.process_id = fc.process_id
@@ -2230,7 +2228,7 @@
                           on o.order_id = od.order_id
        where  o.create_order>0
          and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
              odpd.broken_num != 0 and odpd.process!='切割'
              odpd.broken_num != 0 and odpd.process!=SUBSTRING_INDEX(ogd.process, '->', 1)
        and position(#{selectProcesses} in odpd.process)
        and position(#{orderId} in od.order_id)
        and position(#{inputProject} in o.project)
@@ -2314,7 +2312,6 @@
        reporting_work as rwk
        on rw.reporting_work_id = rwk.reporting_work_id
        where position(#{selectProcesses} in rwk.this_process)
        and rwk.this_process!='切割'
        and rw.review_status >= 0
        GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c
        on c.process_id = fc.process_id
@@ -2324,7 +2321,7 @@
        on o.order_id = od.order_id
        where  o.create_order>0
        and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
        odpd.broken_num != 0 and odpd.process!='切割'
        odpd.broken_num != 0 and odpd.process!=SUBSTRING_INDEX(ogd.process, '->', 1)
        and position(#{selectProcesses} in odpd.process)
        and position(#{orderId} in od.order_id)
        and position(#{inputProject} in o.project)
@@ -2388,7 +2385,6 @@
        reporting_work as rwk
        on rw.reporting_work_id = rwk.reporting_work_id
        where position(#{selectProcesses} in rwk.this_process)
        and rwk.this_process!='切割'
        and rw.review_status >= 0
        GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c
        on c.process_id = fc.process_id
@@ -2398,7 +2394,7 @@
        on o.order_id = od.order_id
        where  o.create_order>0
        and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
        odpd.broken_num != 0 and odpd.process!='切割'
        odpd.broken_num != 0 and odpd.process!=SUBSTRING_INDEX(ogd.process, '->', 1)
        and position(#{selectProcesses} in odpd.process)
        and position(#{orderId} in od.order_id)
        and position(#{inputProject} in o.project)