From b092806a662b99310cdb050292de2721ba06acd9 Mon Sep 17 00:00:00 2001 From: wu <731351411@qq.com> Date: 星期二, 19 十一月 2024 14:43:18 +0800 Subject: [PATCH] 增加测量台直通模式,增加手动参数界面的JSON文件 --- springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java | 59 +++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 33 insertions(+), 26 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java b/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java index 47c8255..fcadaaf 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java +++ b/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java @@ -239,18 +239,18 @@ } // 鎸囧畾鏍煎瓙鍑虹墖 - public Result AddOutGlass(Integer cell,Integer glasstype) { + public Result AddOutGlass(Integer cell, Integer glasstype) { GlassInfo glass = albaniaMapper.SelectGlassInfo(glasstype); Map<String, Object> map = new HashMap<>(); - if(glass!=null){ - albaniaMapper.AddFinishNumber(glass.getFlowcard(),glass.getMateid(), glass.getTier()); - UpdateStroageCageByCell(cell, -1);// 鐜荤拑鏁伴噺-1 - // 澧炲姞鍑虹墖闃熷垪鐨勪换鍔� - albaniaMapper.InsertOutTask(1, 0, cell, 2001,glass.getGlassid(), - glass.getGlasstype(), glass.getFlowcard(),glass.getMateid(),glass.getTier()); - map.put("message", "200"); - }else{ - map.put("message", "300"); + if (glass != null) { + albaniaMapper.AddFinishNumber(glass.getFlowcard(), glass.getMateid(), glass.getTier()); + UpdateStroageCageByCell(cell, -1);// 鐜荤拑鏁伴噺-1 + // 澧炲姞鍑虹墖闃熷垪鐨勪换鍔� + albaniaMapper.InsertOutTask(1, 0, cell, 2001, glass.getGlassid(), + glass.getGlasstype(), glass.getFlowcard(), glass.getMateid(), glass.getTier()); + map.put("message", "200"); + } else { + map.put("message", "300"); } return Result.success(map); } @@ -276,13 +276,14 @@ } return storageTasks; } - - //鏌ヨ鍑虹墖闃熷垪 + + // 鏌ヨ鍑虹墖闃熷垪 public List<Map> SelectOutTask() { return homeMapper.SelectOutTask(); } - //鏌ヨ鍑虹墖闃熷垪 - public List<Map> SelectOutLog() { + + // 鏌ヨ鍑虹墖闃熷垪 + public List<Map> SelectOutLog() { return homeMapper.SelectOutLog(); } @@ -449,18 +450,20 @@ public Result UpdateQueue(GlassInfo glassInfo) { // 鍒犻櫎鏁版嵁 Map<String, Object> map = new HashMap<>(); - // QueueMapper.DeleteQueue(); - System.out.println("浜哄伐鍖归厤ID锛�"+glassInfo.getMateid()+"鑶滅郴:"+glassInfo.getFilms()); - int count = homeMapper.SelectQueue(); - if (count > 0) { - homeMapper.UpdateQueue(glassInfo.getFlowcard(), glassInfo.getWidth(), glassInfo.getHeight(), + QueueMapper.DeleteQueue(); + System.out.println("浜哄伐鍖归厤ID:" + glassInfo.getMateid() + "鑶滅郴:" + glassInfo.getFilms()); + // int count = homeMapper.SelectQueue(); + // if (count > 0) { + // homeMapper.UpdateQueue(glassInfo.getFlowcard(), glassInfo.getWidth(), glassInfo.getHeight(), + // glassInfo.getGlasstype(), glassInfo.getThickness(), glassInfo.getTier(), glassInfo.getMateid()); + homeMapper.AddQueue(glassInfo.getFlowcard(), glassInfo.getWidth(), glassInfo.getHeight(), glassInfo.getGlasstype(), glassInfo.getThickness(), glassInfo.getTier(), glassInfo.getMateid()); PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 1); map.put("message", "200"); - } else { - map.put("message", "300"); - } + // } else { + // map.put("message", "300"); + // } return Result.success(map); } @@ -491,6 +494,7 @@ map.put("message", "200"); return Result.success(map); } + // 寮�濮�/鏆傚仠鍑虹墖闃熷垪 public Result UpdateOutTask(Integer id, Integer state) { homeMapper.UpdateOutTask(id, state); @@ -498,7 +502,8 @@ map.put("message", "200"); return Result.success(map); } - //鍒犻櫎鍑虹墖闃熷垪 + + // 鍒犻櫎鍑虹墖闃熷垪 public Result DeleteOutTask(Integer id) { homeMapper.DeleteOutTask(id); Map<String, Object> map = new HashMap<>(); @@ -553,7 +558,7 @@ && item.get("films") != null && item.get("base") != null && item.get("height") != null && item.get("thickness") != null && item.get("quantity") != null - && item.get("matching") != null)&& item.get("Customer") != null) + && item.get("matching") != null)) .collect(Collectors.toList()); TypeDatas.forEach(item -> { @@ -615,9 +620,11 @@ , 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),map.get("Customer").toString());// 闇�瑕佽绠楁�诲眰鏁� + Integer.parseInt(map.get("quantity").toString()), groupby.get(tierkey), + map.get("Customer").toString());// 闇�瑕佽绠楁�诲眰鏁� // 璁㈠崟鍐呮�诲眰鏁� - homeMapper.InsertFlowcard(map.get("order").toString(), OrderFinishedProduct.get(tierkey + "_Sum"), map.get("Customer").toString()); + homeMapper.InsertFlowcard(map.get("order").toString(), OrderFinishedProduct.get(tierkey + "_Sum"), + map.get("Customer").toString()); count++; } Map<String, Object> ResultCode = new HashMap<>(); -- Gitblit v1.8.0