From 4e3b8155722b66e25df3c6fd42cc586b68dea391 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期五, 06 六月 2025 13:55:39 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java | 96 +++++++++++++++++++++++++++++++++++-------------
1 files changed, 70 insertions(+), 26 deletions(-)
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
index 6e35509..ae5354a 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
@@ -4,20 +4,19 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.yulichang.base.MPJBaseServiceImpl;
import com.github.yulichang.query.MPJQueryWrapper;
+import com.mes.engineering.entity.Engineering;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.entity.OptimizeGlassinfo;
+import com.mes.glassinfo.entity.dto.HollowGlassInfoDTO;
import com.mes.glassinfo.mapper.GlassInfoMapper;
import com.mes.glassinfo.service.GlassInfoService;
import com.mes.pp.entity.OptimizeProject;
import com.mes.pp.mapper.OptimizeProjectMapper;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import javax.annotation.Resource;
+import java.util.*;
import java.util.stream.Collectors;
/**
@@ -31,22 +30,24 @@
@Service
@Slf4j
public class GlassInfoServiceImpl extends MPJBaseServiceImpl<GlassInfoMapper, GlassInfo> implements GlassInfoService {
- @Autowired
+ @Resource
OptimizeProjectMapper optimizeProjectMapper;
@Override
@DS("pp")
- public List<GlassInfo> selectGlassInfo(String engineeringId) {
+ public List<GlassInfo> selectGlassInfo(Engineering engineeringId) {
List<OptimizeGlassinfo> optimizeGlassinfos = null;
if (engineeringId != null) {
optimizeGlassinfos = optimizeProjectMapper.selectJoinList(OptimizeGlassinfo.class, new MPJQueryWrapper<OptimizeProject>()
- .select("b.process_id,t.glass_type,b.o_width,b.o_height,t.glass_thickness,b.order_sort,b.p_width,b.p_height,b.layer, b.total_layer, b.stock_id,b.heat_layout_id,b.heat_layout_sort,c.x_axis,c.y_axis,b.project_no,b.glass_id,c.rotate_angle")
+ .select("b.process_id,t.glass_type,b.o_width,b.o_height,t.glass_thickness,b.order_sort,b.p_width,b.p_height,b.layer," +
+ "d.layers_number AS total_layer, b.stock_id,b.heat_layout_id,b.heat_layout_sort, b.x_axis,b.y_axis," +
+ "c.x_axis as x_axis_heat,c.y_axis as y_axis_heat,b.project_no,b.glass_id,c.rotate_angle,d.merge as combine ,b.mark_icon")
.leftJoin("optimize_detail b on t.project_no=b.project_no")
- .leftJoin("optimize_heat_detail c on c.project_no=t.project_no and b.heat_layout_id=c.layout_id and b.heat_layout_sort=c.sort")
+ .leftJoin("optimize_heat_detail c on c.project_no=t.project_no and b.heat_layout_id=c.layout_id and b.heat_layout_sort=c.sort")
+ .leftJoin("flow_card d on d.process_id=b.process_id and d.technology_number=b.layer and d.order_number=b.order_sort ")
//.eq("t.state",100)
- .eq("t.project_no", engineeringId));
+ .eq("t.project_no", engineeringId.getEngineerId()));
}
- //order_sort,o_width,o_height
// 鍒涘缓涓�涓� List 鐢ㄤ簬淇濆瓨鏄犲皠鍚庣殑瀹炰綋瀵硅薄
List<GlassInfo> resultList = new ArrayList<>();
@@ -58,21 +59,31 @@
glassInfo.setEngineerId(map.getProjectNo());
glassInfo.setFlowCardId(map.getProcessId());
glassInfo.setFilmsid(map.getGlassType());
- glassInfo.setGlassType(map.getOrderSort());//璁㈠崟搴忓彿
- glassInfo.setWidth(map.getOWidth());//璁㈠崟瀹�
- glassInfo.setHeight(map.getOHeight());//璁㈠崟楂�
+ //璁㈠崟搴忓彿
+ glassInfo.setGlassType(map.getOrderSort());
+ //璁㈠崟瀹�
+ glassInfo.setWidth(map.getOWidth());
+ //璁㈠崟楂�
+ glassInfo.setHeight(map.getOHeight());
glassInfo.setEdgWidth(map.getPWidth());
- glassInfo.setLayer(map.getLayer());
- glassInfo.setTotalLayer(map.getTotalLayer());
glassInfo.setEdgHeight(map.getPHeight());
glassInfo.setThickness(map.getGlassThickness());
- glassInfo.setPatternSequence(map.getStockId());//
- glassInfo.setTemperingLayoutId(map.getHeatLayoutId());//閽㈠寲鐗堝浘id
- glassInfo.setTemperingFeedSequence(map.getHeatLayoutSort());//閽㈠寲鐗堝浘椤哄簭
- glassInfo.setXCoordinate(map.getXAxis());
- glassInfo.setYCoordinate(map.getYAxis());
+ glassInfo.setLayer(map.getLayer());
+ glassInfo.setTotalLayer(map.getTotalLayer());
+ glassInfo.setPatternSequence(map.getStockId());
+ glassInfo.setXAxis(map.getXAxis());
+ glassInfo.setYAxis(map.getYAxis());
+ //閽㈠寲鐗堝浘id
+ glassInfo.setTemperingLayoutId(map.getHeatLayoutId());
+ //閽㈠寲鐗堝浘椤哄簭
+ glassInfo.setTemperingFeedSequence(map.getHeatLayoutSort());
+ glassInfo.setXCoordinate(map.getXAxisHeat());
+ glassInfo.setYCoordinate(map.getYAxisHeat());
glassInfo.setAngle(map.getRotateAngle());
glassInfo.setGlassId(map.getGlassId());
+ glassInfo.setCombine(map.getCombine());
+ glassInfo.setMarkIcon(map.getMarkIcon());
+ glassInfo.setFilmRemove(engineeringId.getFilmRemove());
// 灏嗘槧灏勫悗鐨勫璞℃坊鍔犲埌缁撴灉鍒楄〃涓�
resultList.add(glassInfo);
}
@@ -89,9 +100,16 @@
@Override
- public int getGlassInfoCountByFlowCardId(String flowCardId) {
- return baseMapper.selectCount(new QueryWrapper<GlassInfo>().lambda()
- .eq(GlassInfo::getFlowCardId, flowCardId));
+ public int getGlassInfoCountByFlowCardId(String flowCardId, int layer) {
+ if (layer == 0) {
+ return baseMapper.selectCount(new QueryWrapper<GlassInfo>().lambda()
+ .eq(GlassInfo::getFlowCardId, flowCardId));
+ } else {
+ return baseMapper.selectCount(new QueryWrapper<GlassInfo>().lambda()
+ .eq(GlassInfo::getFlowCardId, flowCardId)
+ .eq(GlassInfo::getLayer, layer));
+ }
+
}
@@ -112,20 +130,46 @@
new QueryWrapper<GlassInfo>()
.in("engineer_id", engineerIds)
.groupBy("flow_card_id")
+ .groupBy("layer")
);
// 杞崲涓� List<Map<String, Object>>
List<Map<String, Object>> result = glassInfos.stream()
.map(glassInfo -> {
Map<String, Object> map = new HashMap<>();
- map.put("flow_card_id", glassInfo.getFlowCardId());
+ map.put("flow_card_id", glassInfo.getFlowCardId() + " | " + glassInfo.getLayer());
// 濡傛灉杩樻湁鍏朵粬瀛楁闇�瑕佹坊鍔犲埌 map 涓紝鍦ㄨ繖閲岀户缁坊鍔�
return map;
})
.collect(Collectors.toList());
- log.info("result: {}", result);
+ log.info("result666: {}", result);
return result;
}
+ @Override
+ public List<HollowGlassInfoDTO> listBySize(String engineerId) {
+ return baseMapper.listBySize(engineerId);
+ }
+
+ @Override
+ public void deleteTask(String engineerId) {
+ QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("engineer_id", engineerId);
+ baseMapper.delete(queryWrapper);
+ }
+
+ @Override
+ public List<GlassInfo> selectEdgGlassInfo(String engineeringId) {
+ List<GlassInfo> glassInfos = null;
+ if (engineeringId != null) {
+ glassInfos = baseMapper.selectJoinList(GlassInfo.class, new MPJQueryWrapper<GlassInfo>()
+ .select("t.engineer_id,t.glass_id,t.tempering_layout_id,t.tempering_feed_sequence,t.width,t.height,t.thickness,t.filmsid,t.flow_card_id")
+ .leftJoin("edg_storage_cage_details b on t.engineer_id=b.engineer_id and t.glass_id=b.glass_id")
+ .isNull("b.glass_id")
+ .eq("t.engineer_id", engineeringId));
+ }
+ return glassInfos;
+ }
+
}
--
Gitblit v1.8.0