| | |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.job.DownLoadCacheGlassTask; |
| | | import com.mes.pp.service.FlowCardService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class DownGlassInfoServiceImpl extends ServiceImpl<DownGlassInfoMapper, DownGlassInfo> implements DownGlassInfoService { |
| | | |
| | |
| | | } |
| | | return "success"; |
| | | } |
| | | |
| | | @Override |
| | | public List<DownWorkstation> queryWorkStationIsFull() { |
| | | //查询可以落架的玻璃信息且已绑定流程卡的工位信息 |
| | |
| | | } |
| | | } |
| | | return workstationFull; |
| | | }@Override |
| | | public List<Map<String, List<Map<String, Object>>>> downGlassPrint(DownGlassInfo downGlassInfo){ |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, List<Map<String, Object>>>> downGlassPrint(DownGlassInfo downGlassInfo) { |
| | | log.info("打印参数:{}", downGlassInfo); |
| | | QueryWrapper<DownGlassInfo> queryWrapper = Wrappers.query(); |
| | | queryWrapper.eq("flow_card_id", "NG24080012A001") |
| | | .eq("layer", 1) |
| | | .select("flow_card_id", "layer", "width", "height", "filmsid", "thickness","glass_type","COUNT(*) AS quantity") |
| | | 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"); |
| | | List<Map<String, Object>> resultList = baseMapper.selectMaps(queryWrapper); |
| | | log.info("MES落架数据:{}", resultList); |
| | | |
| | | |
| | | List<Map<String, Object>> projectInfo=flowCardService.selectProject(downGlassInfo.getFlowCardId(),downGlassInfo.getLayer()); |
| | | List<Map<String, Object>> flowCardInfo=flowCardService.selectFlowCard(downGlassInfo.getFlowCardId(),downGlassInfo.getLayer()); |
| | | |
| | | List<Map<String, Object>> projectInfo = flowCardService.selectProject(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer()); |
| | | 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> row1 : resultList) { |
| | | int glass_type = (int) row1.get("glass_type"); |
| | | int layer = (int) row1.get("layer"); |
| | | Long quantity=(Long) row1.get("quantity"); |
| | | Long quantity = (Long) row1.get("quantity"); |
| | | |
| | | if(order_number==glass_type&&technology_number==layer){ |
| | | row.put("quantity1",quantity); |
| | | if (order_number == glass_type && technology_number == layer) { |
| | | row.put("quantity1", quantity); |
| | | } |
| | | } |
| | | } |
| | | List<Map<String, List<Map<String, Object>>>> listMap=new ArrayList<>(); |
| | | log.info("流程卡玻璃数据2:{}", flowCardInfo); |
| | | 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); |
| | | for (Map<String, Object> row : projectInfo) { |
| | | String order_number = (String) row.get("process"); |
| | | String[] processes=order_number.split("->"); |
| | | String[] processes = order_number.split("->"); |
| | | List<Map<String, Object>> processList = new ArrayList<>(); |
| | | for (int i = 0; i < processes.length; i++) { |
| | | Map<String, Object> processMap = new JSONObject(); |