廖井涛
2025-04-10 9425caa266245d82e7442f93cd47c5e263be2242
Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
9个文件已修改
102 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | 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/mapper/pp/ReportMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/Report.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue
@@ -121,12 +121,18 @@
const route = currentRoute.value
let processId = route.query.processId
let merge = null
//第一次加载数据
request.post(`/processCard/flowCardDetail/${processId}`, filterData.value).then((res) => {
  if (res.code == 200) {
    produceList = produceList.value.concat(deepClone(res.data.data))
    merge = res.data.merge
    console.log(merge)
    if(merge != 0){
      gridOptions.toolbarConfig.buttons[0].name='取消合并'
    }
    xGrid.value.reloadData(produceList)
    gridOptions.loading = false
  } else {
@@ -273,7 +279,7 @@
                type: 'warning',
              }
          ).then(()=>{
            request.post("/processCard/mergeFlowCard", flowData.value).then((res) => {
            request.post(`/processCard/mergeFlowCard/${merge}`, flowData.value).then((res) => {
              if(res.code==200 && res.data==="true"){
                ElMessage.success(t('basicData.msg.saveSuccess'))
                router.push({path: '/main/processCard/SelectProcessCard', query:{random:Math.random()}})
north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue
@@ -101,6 +101,9 @@
    produceList = produceList.value.concat(deepClone(res.data.data))
    titleSelectJson.value.processType = res.data.process
    titleSelectJson.value.processType.unshift(newItem.value)
    produceList.forEach(item => {
      item.mmTotal = sumMmValues(item.workProcessName);
    });
    xGrid.value.reloadData(produceList)
    gridOptions.loading = false
  } else {
@@ -122,6 +125,9 @@
      total.value = res.data.footSum
      produceList = deepClone(res.data.data)
      produceList.forEach(item => {
        item.mmTotal = sumMmValues(item.workProcessName);
      });
      xGrid.value.reloadData(produceList)
    } else {
      ElMessage.warning(res.msg)
@@ -146,14 +152,29 @@
      total.dataTotal = res.data.total.total * 1
      total.pageTotal = res.data.total.pageTotal
      pageTotal.value = res.data.total
      xGrid.value.loadData(res.data.data)
      produceList = res.data.data
      produceList.forEach(item => {
        item.mmTotal = sumMmValues(item.workProcessName);
      });
      console.log(produceList)
      xGrid.value.loadData(produceList)
      gridOptions.loading = false
    } else {
      ElMessage.warning(res.msg)
    }
  })
}
 const sumMmValues = (workProcessName) => {
  if (!workProcessName) return 0;
  return workProcessName
      .split('+') // 拆分每个部分
      .map(part => {
        const match = part.match(/^(\d+)(?=mm)/); // 提取 mm 前面的数字
        return match ? parseInt(match[1], 10) : 0;
      })
      .reduce((sum, num) => sum + num, 0); // 求和
}
//页脚跳转
const handlePageChange = ({currentPage, pageSize}) => {
  pageNum.value = currentPage
@@ -198,6 +219,9 @@
      pageNum.value=1
      total.value = res.data.footSum
      produceList = deepClone(res.data.data)
      produceList.forEach(item => {
        item.mmTotal = sumMmValues(item.workProcessName);
      });
      xGrid.value.reloadData(produceList)
      gridOptions.loading=false
    } else {
@@ -269,6 +293,7 @@
    {field: 'code', width: 100, title: t('reportingWorks.glassNumber')},
    {field: 'width', width: 90, title: t('order.width')},
    {field: 'height', width: 90, title: t('order.height')},
    {field: 'mmTotal', width: 90, title: t('order.totalThickness')},
    {field: 'workProcessName', width: 120, title: t('report.workProcessName')},
    {field: 'edgingType', width: 110, title: t('order.edgingType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'completedQuantity', width: 90, title: t('reportingWorks.completedQuantity')},
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -375,9 +375,10 @@
    }
    @ApiOperation("合并流程卡接口")
    @PostMapping("/mergeFlowCard")
    public Result mergeFlowCard(@RequestBody Map<String, Object> object) {
        return Result.seccess(flowCardService.mergeFlowCard(object));
    @PostMapping("/mergeFlowCard/{merge}")
    public Result mergeFlowCard(@RequestBody Map<String, Object> object,
                                @PathVariable Integer merge) {
        return Result.seccess(flowCardService.mergeFlowCard(object,merge));
    }
    @ApiOperation("汉玻获取流程卡接口")
    @PostMapping("/getProcessCardList/hanbo")
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -243,4 +243,8 @@
    Boolean updatePrintNumberMp(String processId, Integer orderNumber);
    String getOrderIdByProcessId(String processId);
    Boolean updateFlowCardIsMerge(String processId);
    Integer flowCardDetailMergeMp(String processId);
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
@@ -2,7 +2,6 @@
import com.example.erp.dto.pp.*;
import com.example.erp.entity.pp.DamageDetails;
import com.example.erp.entity.pp.Report;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -67,7 +66,7 @@
    List<YieldDTO> exportYieldMp(List<LocalDate> date, String process);
    List<TeamOutputDTO> teamOutputMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO);
    List<TeamOutputDTO> teamOutputMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO);
    Map<String, Integer> teamOutputPageTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO);
@@ -97,6 +96,8 @@
    Map<String,Float> teamOutputFootSum(Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO);
    String getLaminating(String selectProcesses);
//    Map<String, Integer> getWorkInProgressTotal(
//                                                @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2,
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -232,6 +232,7 @@
    public Object flowCardDetailSv(String processId, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.flowCardDetailMp(processId, flowCard));
        map.put("merge", flowCardMapper.flowCardDetailMergeMp(processId));
        return map;
    }
@@ -879,23 +880,27 @@
    }
    public String mergeFlowCard(Map<String, Object> object) {
    public String mergeFlowCard(Map<String, Object> object, Integer merge) {
        String returns = "false";
        List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class);
        if (!flowCardList.isEmpty()) {
            List<Map<String, Object>> flowCardList1 = flowCardMapper.selectFlowCardMerge(flowCardList.get(0).getProcessId());
            int index = 1;
            for (int i = 0; i < flowCardList1.size(); i++) {
                if (Integer.valueOf(flowCardList1.get(i).get("count2").toString()) > 1) {
                    List<Integer> technologyNumber = Arrays.stream(flowCardList1.get(i).get("count1").toString().split(","))
                            .map(Integer::parseInt)
                            .collect(Collectors.toList());
                    flowCardMapper.updateFlowCardMerge(flowCardList.get(0).getProcessId(), technologyNumber, index);
                    index += 1;
                    returns = "true";
            if (merge == 0){
                int index = 1;
                for (int i = 0; i < flowCardList1.size(); i++) {
                    if (Integer.valueOf(flowCardList1.get(i).get("count2").toString()) > 1) {
                        List<Integer> technologyNumber = Arrays.stream(flowCardList1.get(i).get("count1").toString().split(","))
                                .map(Integer::parseInt)
                                .collect(Collectors.toList());
                        flowCardMapper.updateFlowCardMerge(flowCardList.get(0).getProcessId(), technologyNumber, index);
                        index += 1;
                        returns = "true";
                    }
                }
            }else {//取消合并
                flowCardMapper.updateFlowCardIsMerge(flowCardList.get(0).getProcessId());
                returns = "true";
            }
        }
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -430,7 +430,8 @@
        }
        Integer offset = (pageNum - 1) * pageSize;
        Map<String, Object> map = new HashMap<>();
        map.put("data", reportMapper.teamOutputMp(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO));
        String laminating = reportMapper.getLaminating(selectProcesses);
        map.put("data", reportMapper.teamOutputMp(offset, pageSize, selectTime1, selectTime2,selectProcesses,laminating, teamOutputDTO));
        map.put("process", productionSchedulingMapper.selectProcess());
        map.put("total", reportMapper.teamOutputPageTotal(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO));
        map.put("footSum" ,reportMapper.teamOutputFootSum(selectTime1, selectTime2,selectProcesses, teamOutputDTO));
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -2847,7 +2847,7 @@
                  left join sd.order_detail as od on od.order_id = SUBSTRING(fc.process_id,1,10)  and od.order_number = fc.order_sort
                  left join sd.`order` as o on o.order_id = SUBSTRING(fc.process_id,1,10)
                  left join pp.`flow_card` as fcd on fcd.process_id=fc.process_id and fcd.technology_number=ogd.technology_number and fcd.order_number=od.order_number
        where fc.project_no = #{printProject}
        where fc.project_no = #{printProject} and fc.process_id is not null and fc.process_id!=""
        GROUP BY fc.process_id, ogd.technology_number
        order by fc.process_id, ogd.technology_number
    </select>
@@ -3061,4 +3061,13 @@
    <select id="getOrderIdByProcessId">
        select order_id from pp.flow_card  where process_id = #{processId} limit 1;
    </select>
    <select id="flowCardDetailMergeMp">
        select merge from pp.flow_card where process_id = #{processId}  group by id ORDER BY merge desc LIMIT 1
    </select>
    <update id="updateFlowCardIsMerge">
        update  pp.flow_card fc set fc.merge=0
        where fc.process_id = #{processId}
    </update>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -1337,7 +1337,11 @@
        JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code,
        rw.reviewed,
        rw.examine_time,
        GROUP_CONCAT(ogd.glass_child SEPARATOR '+') as workProcessName
--         GROUP_CONCAT(ogd.glass_child SEPARATOR '+') as workProcessName
        CASE
        WHEN #{laminating} = 'laminating' THEN GROUP_CONCAT(ogd.glass_child SEPARATOR '+')
        ELSE MAX( ogd.glass_child )
        END AS workProcessName
        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
@@ -2080,4 +2084,8 @@
        rw.teams_groups_name
        ) as subquery
    </select>
    <select id="getLaminating">
        select IFNULL(nickname,'') from sd.basic_data where basic_category='process' and basic_name=#{selectProcesses}
    </select>
</mapper>