chenlu
2025-07-04 3c0b14c34a32b2aea11a233a51e1576f63eb920a
流程卡打印添加 指定层同架功能
12个文件已修改
201 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue 16 ●●●● 补丁 | 查看 | 原始文档 | 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/views/pp/processCard/PrintFlowCard.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintProject.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -34,7 +34,8 @@
  printProject:null,
  merges:null,
  printFc:null,
  flashback:null
  flashback:null,
  compound:null
})
const {currentRoute} = useRouter()
@@ -62,6 +63,12 @@
if (merges == '') {
  merges = null
}
//指定层同架
let compound = props.compound
if (compound == '') {
  compound = null
}
let name=company.companyName
let printNumberFc = props.printFc
@@ -78,7 +85,7 @@
          }
        })
      }else{
        request.post(`/processCard/getSelectPrinting/${merge}/${like}/${merges}/${props.flashback}`, data.value).then((res) => {
        request.post(`/processCard/getSelectPrinting/${merge}/${like}/${merges}/${props.flashback}/${compound}`, data.value).then((res) => {
          if (res.code == 200) {
            load(res.data.data)
          } else {
@@ -264,7 +271,10 @@
          <div id="bj" v-if="printFc=='true'" style="float: right;font-size: 28px">{{ id + 1 }}</div>
          <div id="bj" v-else style="float: right;font-size: 28px"></div>
          <div>{{ company.companyName }}</div>
          <div>生产流程卡<span style="font-weight: bold" v-if="printProject!=null">({{ printProject }})</span></div>
          <div>
            生产流程卡<span style="font-weight: bold" v-if="printProject!=null">({{ printProject }})</span>
            <span style="font-weight: bold" v-if="props.compound!=null">({{ props.compound }}层同架)</span>
          </div>
          <div  style="font-weight: bolder;display: flex;justify-content:space-between">
            <div>
              打印人:{{user.user.userName}} &nbsp;&nbsp;
north-glass-erp/northglass-erp/src/lang/ar.js
@@ -388,7 +388,8 @@
            selectDetailProcessCard:"流程卡明细查询"
        },
        flashback:'倒叙',
        printCompound:'需要同架的层',
        flashback:'倒序',
        processId:'رقم بطاقة العملية',
        founder:'موزع الرفوف',
        layoutStatus:'الحالة',
north-glass-erp/northglass-erp/src/lang/en.js
@@ -388,7 +388,8 @@
            printFlowCard:"Process card printing",
            selectDetailProcessCard:"Process card details query"
        },
        flashback:'倒叙',
        printCompound:'需要同架的层',
        flashback:'倒序',
        processId:'Process Card Number',
        founder:'Divider',
        layoutStatus:'Type Setting',
north-glass-erp/northglass-erp/src/lang/kr.js
@@ -397,7 +397,8 @@
            selectDetailProcessCard:'프로세스 카드 상세 조회'
        },
        flashback:'倒叙',
        printCompound:'需要同架的层',
        flashback:'倒序',
        processId:'프로세스 카드 번호',
        founder:'분배 작업자',
        layoutStatus:'가공 배치 상태',
north-glass-erp/northglass-erp/src/lang/ru.js
@@ -386,7 +386,8 @@
            printFlowCard:"流程卡打印",
            selectDetailProcessCard:"流程卡明细查询"
        },
        flashback:'倒叙',
        printCompound:'需要同架的层',
        flashback:'倒序',
        processId:'Номер процесса',
        founder:'Диспетчер',
        layoutStatus:'Формат',
north-glass-erp/northglass-erp/src/lang/zh.js
@@ -397,7 +397,8 @@
            selectDetailProcessCard:"流程卡明细查询"
        },
        flashback:'倒叙',
        printCompound:'需要同架的层',
        flashback:'倒序',
        processId:'流程卡号',
        founder:'分架员',
        layoutStatus:'排版状态',
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -67,7 +67,8 @@
  like: null,
  merge: null,
  printFc:null,
  flashback:null
  flashback:null,
  compound:null
})
//标签
@@ -80,6 +81,8 @@
//倒叙
let  flashback = ref(1)
//合架打印
let compound = ref(null)
const getTableRow = (row, type) => {
  switch (type) {
@@ -418,6 +421,7 @@
          printRow.value.merge = company.flowCardMerge
          printRow.value.printFc= printFc
          printRow.value.flashback = flashback.value
          printRow.value.compound = compound.value
          // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
          if(company.companyName=='常州市吉利玻璃有限公司'){
            dialogTableVisibleStraight.value = true
@@ -812,6 +816,13 @@
          >
            {{ t('processCard.flashback') }}
          </el-checkbox>
          <el-input
              v-model="compound"
              :placeholder="$t('processCard.printCompound')"
              clearable
              style="margin-left:20px; width: 110px;"
          />
        </template>
        <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
        <!--      下拉显示所有信息插槽-->
@@ -870,6 +881,7 @@
          :printFc="printRow.printFc"
          :merges="printRow.merge"
          :flashback = "printRow.flashback"
          :compound = "printRow.compound"
          style="width: 100%;height: 100%"/>
    </el-dialog>
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintProject.vue
@@ -44,6 +44,11 @@
const company = companyInfo()
let hidePrintLabels = company.printLabel.hideButton;
//倒叙
let  flashback = ref(1)
//合架打印
let compound = ref(null)
const form = reactive({
  date1: '',
  orderId: '',
@@ -56,7 +61,9 @@
  printMergeVal: null,
  like: null,
  project:null,
  merge: null
  merge: null,
  flashback:null,
  compound:null
})
const getTableRow = (row, type) => {
  switch (type) {
@@ -84,6 +91,8 @@
    case 'edit3' :{
      printRow.value.project=row.project_no
      printRow.value.merge = company.flowCardMerge
      printRow.value.flashback = flashback.value
      printRow.value.compound = compound.value
      if(company.companyName=='常州市吉利玻璃有限公司'){
        dialogTableVisibleStraight.value = true
      }else{
@@ -485,6 +494,8 @@
          :printMerge="printRow.printMergeVal"
          :printProject="printRow.project"
          :merges="printRow.merge"
          :flashback = "printRow.flashback"
          :compound = "printRow.compound"
          style="width: 100%;height: 100%"/>
    </el-dialog>
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -187,14 +187,15 @@
    }
    @ApiOperation("打印流程卡数据查询接口")
    @PostMapping("/getSelectPrinting/{printMerge}/{printLike}/{merge}/{flashback}")
    @PostMapping("/getSelectPrinting/{printMerge}/{printLike}/{merge}/{flashback}/{compound}")
    public Result getSelectPrinting(
            @PathVariable String printMerge,
            @PathVariable String printLike,
            @PathVariable String merge,
            @PathVariable String flashback,
            @PathVariable String compound,
            @RequestBody Map<String, Object> object) {
        return Result.seccess(flowCardService.getSelectPrintingSv(object,printMerge,printLike,merge,flashback));
        return Result.seccess(flowCardService.getSelectPrintingSv(object,printMerge,printLike,merge,flashback,compound));
    }
    @ApiOperation("工程打印流程卡数据查询接口")
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -257,4 +257,8 @@
    List<FlowCardDTO> exportDateProcessMp(List<LocalDate> date);
    Integer getSumQuantity(String orderId);
    List<Map<String, Object>> getDetailCompoundList(String processId, String technologyNumber, String process, String flashback, String compound);
    List<Map<String, Object>> getDetailListLikeCompound(String processId, String s, String process, String flashback, String compound);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -296,7 +296,7 @@
        }
    }
    public Map<String, Object> getSelectPrintingSv(Map<String, Object> object, String printMerge, String printLike, String merge, String flashback) {
    public Map<String, Object> getSelectPrintingSv(Map<String, Object> object, String printMerge, String printLike, String merge, String flashback, String compound) {
        if (printMerge == null) {
            printMerge = "";
        }
@@ -325,10 +325,21 @@
                    //获取工序对应的别称
                    String processName = flowCardMapper.getProcessName(processSub);
                    if (processName.equals("stepC") || processName.equals("stepD")) {//工艺是否包含夹胶中空
                        itemmap.put("detail", flowCardMapper.getPrimaryListLimt(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId()));
                        itemmap.put("detail", flowCardMapper.getPrimaryListLimt(flowCard.getProcessId(),
                                String.valueOf(compound != null
                                        ? compound //同架层
                                        : flowCard.getTechnologyNumber()),//正常层
                                flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId()));
                        List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess(),flashback);
                        itemmap.put("detailList", detailList);
                        if (compound == null
                                || "null".equals(compound)
                                || compound.trim().isEmpty()){
                            List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess(),flashback);
                            itemmap.put("detailList", detailList);
                        }else {//有需要同架的层
                            List<Map<String, Object>> detailList = flowCardMapper.getDetailCompoundList(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess(),flashback,compound);
                            itemmap.put("detailList", detailList);
                        }
                    } else {
                        if (merge.equals("1") && flowCard.getMerge().equals(1)) {//否
                            // 检查是否已经处理过该 processId,如果处理过则跳过
@@ -341,9 +352,20 @@
                            List<Map<String, Object>> detailList = flowCardMapper.getDetailListMerge(flowCard.getProcessId(), flowCard.getProcess(),flashback);
                            itemmap.put("detailList", detailList);
                        } else {
                            itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId()));
                            List<Map<String, Object>> detailList = flowCardMapper.getDetailListLike(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getProcess(),flashback);
                            itemmap.put("detailList", detailList);
                            itemmap.put("detail", flowCardMapper.getPrimaryListLimt(flowCard.getProcessId(),
                                    String.valueOf(flashback != null
                                            ? compound //同架层
                                            : flowCard.getTechnologyNumber()),//正常层
                                    flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId()));
                            if (compound == null
                                    || "null".equals(compound)
                                    || compound.trim().isEmpty()){
                                List<Map<String, Object>> detailList = flowCardMapper.getDetailListLike(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getProcess(),flashback);
                                itemmap.put("detailList", detailList);
                            }else {//有需要同架的层
                                List<Map<String, Object>> detailList = flowCardMapper.getDetailListLikeCompound(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getProcess(),flashback,compound);
                                itemmap.put("detailList", detailList);
                            }
                        }
                    }
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -3172,4 +3172,102 @@
    <select id="getSumQuantity">
        select quantity from  sd.`order` where order_id=#{orderId}
    </select>
    <select id="getDetailCompoundList">
        select fc.order_number,
        concat(IF(ROUND(ogd.child_width, 1) = FLOOR(ogd.child_width), FLOOR(ogd.child_width), ROUND(ogd.child_width, 1)), "*", IF(ROUND(child_height, 1) = FLOOR(child_height), FLOOR(child_height), ROUND(child_height, 1)))   as child_width,
        SUM(fc.quantity) as quantity,
        round(SUM(ogd.total_area), 2)                                       as total_area,
        SUM(od.perimeter) as perimeter,
        if(od.bend_radius!=null || od.bend_radius!='',od.bend_radius,if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),'')) as bend_radius,
        concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
        od.other_columns,
        round(ogd.child_width)                                         as width,
        round(ogd.child_height)                                        as height,
        pd.separation,
        #{compound} as technology_number,
        IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber,
        od.building_number
        from flow_card as fc
        left join sd.order_glass_detail as ogd
        on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
        fc.technology_number = ogd.technology_number
        left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
        left join sd.product_detail as pd
        on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
        left join flow_card_sort as fcs
        on fcs.process_id = fc.process_id and fcs.order_number = fc.order_number and
        fcs.technology_number = fc.technology_number
        and fcs.process = #{process}
        where fc.process_id = #{processId}
        and position(fc.technology_number in #{compound})
        group by fc.process_id, fc.order_number
        <choose>
            <!-- flashback = 1 时正序 -->
            <when test="flashback == 1">
                ORDER BY
                CASE
                WHEN fcs.sort IS NOT NULL AND fcs.sort &lt;&gt;  '' THEN fcs.sort
                ELSE fc.order_number
                END ASC
            </when>
            <!-- flashback != 1 时倒序 -->
            <otherwise>
                ORDER BY
                CASE
                WHEN fcs.sort IS NOT NULL AND fcs.sort &lt;&gt;  '' THEN fcs.sort
                ELSE fc.order_number
                END DESC
            </otherwise>
        </choose>
    </select>
    <select id="getDetailListLikeCompound">
        select fc.order_number,
        concat(IF(ROUND(ogd.child_width, 1) = FLOOR(ogd.child_width), FLOOR(ogd.child_width), ROUND(ogd.child_width, 1)), "*", IF(ROUND(child_height, 1) = FLOOR(child_height), FLOOR(child_height), ROUND(child_height, 1)))   as child_width,
        sum(fc.quantity) as quantity,
        round(sum(ogd.total_area), 2)                                       as total_area,
        sum(od.perimeter) as perimeter,
        if(od.bend_radius!=null || od.bend_radius!='',od.bend_radius,if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),'')) as bend_radius,
        concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
        od.other_columns,
        round(ogd.child_width)                                         as width,
        round(ogd.child_height)                                        as height,
        pd.separation,
        #{compound} as technology_number,
        IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber,
        od.building_number
        from flow_card as fc
        left join sd.order_glass_detail as ogd
        on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
        fc.technology_number = ogd.technology_number
        left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
        left join sd.product_detail as pd
        on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
        left join flow_card_sort as fcs
        on fcs.process_id = fc.process_id and fcs.order_number = fc.order_number and
        fcs.technology_number = fc.technology_number
        and fcs.process = #{process}
        where fc.process_id = #{processId}
        and position(fc.technology_number in #{compound})
        group by fc.process_id, fc.order_number
        <choose>
            <!-- flashback = 1 时正序 -->
            <when test="flashback == 1">
                ORDER BY
                CASE
                WHEN fcs.sort IS NOT NULL AND fcs.sort &lt;&gt;  '' THEN fcs.sort
                ELSE fc.order_number
                END ASC
            </when>
            <!-- flashback != 1 时倒序 -->
            <otherwise>
                ORDER BY
                CASE
                WHEN fcs.sort IS NOT NULL AND fcs.sort &lt;&gt;  '' THEN fcs.sort
                ELSE fc.order_number
                END DESC
            </otherwise>
        </choose>
    </select>
</mapper>