| | |
| | | homeMapper.DeleteStroageCageByCell(cell); |
| | | } else { |
| | | homeMapper.updateStroageCageByCell(cell, num); |
| | | homeMapper.UpdateStroageCageWidthByCell(cell); |
| | | homeMapper.UpdateStroageCageWidthByCell(cell);//修改笼子宽度 |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | |
| | | homeMapper.FinishTask(storageTask.getId());// 完成任务 |
| | | if (storageTask.getTaskType().equals("0")) { |
| | | UpdateStroageCageByCell(Integer.parseInt(storageTask.getLoadrack()), 1);// 玻璃数量+1 |
| | | homeMapper.DeletequeueByGlassid(storageTask.getGlassId()); |
| | | } else { |
| | | StorageCage storageCage = homeMapper.SelectStorageByCell(storageTask.getShelfRack()); |
| | | if (storageCage.getNumber() > 1) { |
| | |
| | | // 修改测量信息 |
| | | public Result UpdateQueue(GlassInfo glassInfo) { |
| | | homeMapper.UpdateQueue(glassInfo.getFlowcard(), glassInfo.getWidth(), glassInfo.getHeight(), |
| | | glassInfo.getGlasstype(),glassInfo.getThickness()); |
| | | glassInfo.getGlasstype(),glassInfo.getThickness(),glassInfo.getTier()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | |
| | | |
| | | System.out.println(RemoveErrorData.size()); |
| | | // 处理完成 添加数据库 |
| | | int count=1; |
| | | for (Map map : RemoveErrorData) { |
| | | String key = map.get("base").toString() + "_" + map.get("height").toString() + "_" |
| | | + map.get("thickness").toString() + "_" + map.get("films").toString(); |
| | |
| | | Integer glasstype; |
| | | if (TypeData.get(key) == null) { |
| | | glasstype = homeMapper.SelectMaxType(); |
| | | if (glasstype==null) { |
| | | glasstype=1; |
| | | } |
| | | } else { |
| | | glasstype = Integer.valueOf(value); |
| | | } |
| | | // |
| | | homeMapper.AddGlassinfo(map.get("order").toString(), glasstype, |
| | | Integer.parseInt(map.get("matching").toString()) // 需要计算 配片ID |
| | | , glasstype+"" // 需要计算 玻璃ID |
| | | ,map.get("order").toString()+"-"+count+"" // 需要计算 玻璃ID |
| | | , Integer.parseInt(map.get("tier").toString()), map.get("films").toString(), |
| | | Double.parseDouble(map.get("base").toString()), Double.parseDouble(map.get("height").toString()), |
| | | Double.parseDouble(map.get("thickness").toString()), |
| | | Integer.parseInt(map.get("quantity").toString()),groupby.get(tierkey));// 需要计算总层数 |
| | | //订单内总层数 |
| | | homeMapper.InsertFlowcard(map.get("order").toString(),OrderFinishedProduct.get(tierkey+"_Sum")); |
| | | count++; |
| | | } |
| | | Map<String, Object> ResultCode = new HashMap<>(); |
| | | ResultCode.put("message", "200"); |