| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | queryWrapper.eq("flow_card_id", downGlassInfo.getFlowCardId()) |
| | | .eq("layer", downGlassInfo.getLayer()) |
| | | .select("flow_card_id", "layer", "width", "height", "filmsid", "thickness", "glass_type", "COUNT(*) AS quantity") |
| | | .groupBy("flow_card_id", "layer", "width", "height", "filmsid", "thickness", "glass_type"); |
| | | .groupBy("flow_card_id", "layer", "width", "height", "filmsid", "thickness", "glass_type","id") |
| | | .orderByAsc("id"); |
| | | List<Map<String, Object>> resultList = baseMapper.selectMaps(queryWrapper); |
| | | log.info("MES落架数据:{}", resultList); |
| | | |
| | |
| | | log.info("流程卡头部数据:{}", projectInfo); |
| | | List<Map<String, Object>> flowCardInfo = flowCardService.selectFlowCard(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer()); |
| | | log.info("流程卡玻璃数据:{}", flowCardInfo); |
| | | for (Map<String, Object> row : flowCardInfo) { |
| | | int order_number = (int) row.get("order_number"); |
| | | int technology_number = (int) row.get("technology_number"); |
| | | for (Map<String, Object> row : resultList) { |
| | | int glass_type = (int) row.get("glass_type"); |
| | | int layer = (int) row.get("layer"); |
| | | Long quantity1 = (Long) row.get("quantity"); |
| | | |
| | | for (Map<String, Object> row1 : resultList) { |
| | | int glass_type = (int) row1.get("glass_type"); |
| | | int layer = (int) row1.get("layer"); |
| | | for (Map<String, Object> row1 : flowCardInfo) { |
| | | int order_number = (int) row1.get("order_number"); |
| | | int technology_number = (int) row1.get("technology_number"); |
| | | String child_width = (String) row1.get("child_width"); |
| | | Long quantity = (Long) row1.get("quantity"); |
| | | |
| | | BigDecimal total_area = (BigDecimal) row1.get("total_area"); |
| | | String separation = (String) row1.get("separation"); |
| | | String perimeter = (String) row1.get("perimeter"); |
| | | BigDecimal width = (BigDecimal) row1.get("width"); |
| | | String other_columns = (String) row1.get("other_columns"); |
| | | String remarks = (String) row1.get("remarks"); |
| | | BigDecimal height = (BigDecimal) row1.get("height"); |
| | | if (order_number == glass_type && technology_number == layer) { |
| | | row.put("quantity1", quantity); |
| | | // row.put("quantity1", quantity1); |
| | | // row.put("quantity", quantity); |
| | | row.put("order_number", order_number); |
| | | row.put("technology_number", technology_number); |
| | | row.put("child_width", child_width); |
| | | row.put("total_area", total_area); |
| | | row.put("separation", separation); |
| | | row.put("perimeter", perimeter); |
| | | row.put("width", width); |
| | | row.put("other_columns", other_columns); |
| | | row.put("remarks", remarks); |
| | | row.put("height", height); |
| | | } |
| | | } |
| | | } |
| | |
| | | List<Map<String, List<Map<String, Object>>>> listMap = new ArrayList<>(); |
| | | Map<String, List<Map<String, Object>>> result = new HashMap<>(); |
| | | result.put("detail", projectInfo); |
| | | result.put("detailList", flowCardInfo); |
| | | result.put("detailList", resultList); |
| | | for (Map<String, Object> row : projectInfo) { |
| | | String order_number = (String) row.get("process"); |
| | | String[] processes = order_number.split("->"); |