jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
@@ -344,7 +344,7 @@ if (StringUtils.isEmpty(engineNo)){ return R.fail(500,"箱体码不能为空,请重试"); } if (!engineNo.contains(",")){ if (!engineNo.contains(",") && !engineNo.contains("/") ){ return R.fail(500,"箱体码格式有误,请重试"); } ProductNewPassStation checkStation = new ProductNewPassStation(); @@ -428,7 +428,7 @@ if (StrUtil.isNotBlank(OrderScheduling.getEngineNo())){ String snCode = OrderScheduling.getEngineNo(); if (snCode.startsWith("280") || snCode.startsWith("380")){ if (snCode.startsWith("280") || snCode.startsWith("380") || snCode.startsWith("196") || snCode.startsWith("296")){ ProductNewPassStation productNewPassStation = new ProductNewPassStation(); UUID uuid = UUID.randomUUID(); productNewPassStation.setId(uuid.getMostSignificantBits()); @@ -438,8 +438,12 @@ productNewPassStation.setBoxCode(engineNo); if (snCode.startsWith("280")){ productNewPassStation.setProductType("280"); } else { } else if (snCode.startsWith("380")){ productNewPassStation.setProductType("380"); } else if (snCode.startsWith("196")){ productNewPassStation.setProductType("196"); } else if (snCode.startsWith("296")){ productNewPassStation.setProductType("296"); } productNewPassStationService.insertPassStation(productNewPassStation); } jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/controller/DaTileMatchCollectionController.java
@@ -146,53 +146,59 @@ } String balanceSplit = ""; String boxCodeSplit = ""; // ArrayList<String> xtList = ListUtil.toList(boxCode.split(";")); ArrayList<String> xtList = ListUtil.toList(boxCode.split(",")); ArrayList<String> czList = ListUtil.toList(balanceCode.split(";")); if (CollUtil.isNotEmpty(xtList) && xtList.size()>1 && CollUtil.isNotEmpty(czList) && czList.size()>3){ boxCodeSplit = xtList.get(1); balanceSplit = czList.get(2); } DaTileMatchRules daTileMatchRules = new DaTileMatchRules(); daTileMatchRules.setScanObject1("箱体"); daTileMatchRules.setScanObject2("平衡轴"); daTileMatchRules.setProductSeries(productType); List<DaTileMatchRules> allMatchRuleList = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules); if (CollUtil.isNotEmpty(allMatchRuleList)){ char[] boxCodeCharArray = boxCodeSplit.toCharArray(); char[] balanceCodeCharArray = balanceSplit.toCharArray(); if (boxCodeCharArray.length>6 && balanceCodeCharArray.length>2){ if ("380".equals(productType)){ for (int i = 1; i < 3; i++) { int finalI = i; List<DaTileMatchRules> collect = allMatchRuleList.stream().filter(x -> x.getAxisParameterNoPosition().equals(finalI + 5) && x.getNeckParameterPosition().equals(finalI + 1) && x.getAxisValue().equals(String.valueOf(boxCodeCharArray[finalI + 4])) && x.getNeckValue().equals(String.valueOf(balanceCodeCharArray[finalI]))) .collect(Collectors.toList()); if (CollUtil.isNotEmpty(collect)){ DaTileMatchRules rules = collect.get(0); resultList.add(rules); if ("380".equals(productType)){ // ArrayList<String> xtList = ListUtil.toList(boxCode.split(";")); ArrayList<String> xtList = ListUtil.toList(boxCode.split(",")); ArrayList<String> czList = ListUtil.toList(balanceCode.split(";")); if (CollUtil.isNotEmpty(xtList) && xtList.size()>1 && CollUtil.isNotEmpty(czList) && czList.size()>3){ boxCodeSplit = xtList.get(1); balanceSplit = czList.get(2); } DaTileMatchRules daTileMatchRules = new DaTileMatchRules(); daTileMatchRules.setScanObject1("箱体"); daTileMatchRules.setScanObject2("平衡轴"); daTileMatchRules.setProductSeries(productType); List<DaTileMatchRules> allMatchRuleList = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules); if (CollUtil.isNotEmpty(allMatchRuleList)){ char[] boxCodeCharArray = boxCodeSplit.toCharArray(); char[] balanceCodeCharArray = balanceSplit.toCharArray(); if (boxCodeCharArray.length>6 && balanceCodeCharArray.length>2){ if ("380".equals(productType)){ for (int i = 1; i < 3; i++) { int finalI = i; List<DaTileMatchRules> collect = allMatchRuleList.stream().filter(x -> x.getAxisParameterNoPosition().equals(finalI + 5) && x.getNeckParameterPosition().equals(finalI + 1) && x.getAxisValue().equals(String.valueOf(boxCodeCharArray[finalI + 4])) && x.getNeckValue().equals(String.valueOf(balanceCodeCharArray[finalI]))) .collect(Collectors.toList()); if (CollUtil.isNotEmpty(collect)){ DaTileMatchRules rules = collect.get(0); resultList.add(rules); } } } } } } if (CollUtil.isEmpty(resultList)){ return R.fail("未匹配到平衡轴瓦"); } else { ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP040.CodeComplete", 1); miloService.writeToOpcByte(entity6); ProductNewPassStation passStation = new ProductNewPassStation(); passStation.setProductType(productType); passStation.setBoxCode(boxCode); List<ProductNewPassStation> productPassStationList = productNewPassStationService.getProductPassStationList(passStation); if (CollUtil.isNotEmpty(productPassStationList)){ ProductNewPassStation newPassStation = productPassStationList.get(0); productNewPassStationMapper.updatePassStationBalanceCode(newPassStation.getSfcCode(),balanceCode); if (CollUtil.isEmpty(resultList)){ return R.fail("未匹配到平衡轴瓦"); } else { ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP040.CodeComplete", 1); miloService.writeToOpcByte(entity6); ProductNewPassStation passStation = new ProductNewPassStation(); passStation.setProductType(productType); passStation.setBoxCode(boxCode); List<ProductNewPassStation> productPassStationList = productNewPassStationService.getProductPassStationList(passStation); if (CollUtil.isNotEmpty(productPassStationList)){ ProductNewPassStation newPassStation = productPassStationList.get(0); productNewPassStationMapper.updatePassStationBalanceCode(newPassStation.getSfcCode(),balanceCode); } } } else if ("196".equals(productType)) { // ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP040.CodeComplete", 1); // miloService.writeToOpcByte(entity6); } return R.ok(resultList); } jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -17,6 +17,7 @@ import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; import com.jcdm.main.webservice.service.ReceivingServices; import com.kangaroohy.milo.model.ReadWriteEntity; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -25,6 +26,7 @@ import javax.servlet.http.HttpServletResponse; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -127,6 +127,9 @@ passingStationCollectionServiceImpl.sendMessage(type+"*"+boxCode,"OP030"); } } else if ("196".equals(type) || "296".equals(type)){ ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP030.CodeComplete", 1); miloService.writeToOpcByte(entity6); } } @@ -266,7 +269,7 @@ //如果是老车型,判断是否重复扫码 if (OPCElement.OP050_CODE_CHECK.equals(Node)){ String type = productNewFlag(SNCode); if (!"280".equals(type) && !"380".equals(type)){ if (!"280".equals(type) && !"380".equals(type) && !"196".equals(type) && !"296".equals(type) ){ DaPassingStationCollection passCheck = new DaPassingStationCollection(); passCheck.setSfcCode(SNCode); passCheck.setLocationCode("OP060"); @@ -571,7 +574,7 @@ //60只采集老车型 if (OPCElement.OP060_SAVE_REQUEST.equals(Node) || OPCElement.OP060_SAVE_REQUEST_LAST.equals(Node)){ String s = productNewFlag(SNCode); if ("280".equals(s) || "380".equals(s)){ if ("280".equals(s) || "380".equals(s) || "196".equals(s) || "296".equals(s)){ list = new ArrayList<>(); } } @@ -582,7 +585,7 @@ || OPCElement.OP100_SAVE_REQUEST_LAST.equals(Node)){ String s = productNewFlag(SNCode); if (StrUtil.isNotEmpty(s)){ if (!"280".equals(s) && !"380".equals(s)){ if (!"280".equals(s) && !"380".equals(s) && !"196".equals(s)){ list = new ArrayList<>(); } } @@ -710,6 +713,10 @@ type = "280"; } else if (SNCode.startsWith("380")){ type = "380"; } else if (SNCode.startsWith("196")){ type = "196"; } else if (SNCode.startsWith("296")){ type = "296"; }else { type = "oldType"; } @@ -736,6 +743,20 @@ } } else if ("280".equals(productNewFlag)){ } else if ("196".equals(productNewFlag)){ ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP040.CodeComplete", 1); miloService.writeToOpcByte(entity6); // ProductNewPassStation passStation = new ProductNewPassStation(); // passStation.setSfcCode(SNCode); // List<ProductNewPassStation> productPassStationList = productNewPassStationService.getProductPassStationList(passStation); // if (CollUtil.isNotEmpty(productPassStationList)){ // ProductNewPassStation productNewPassStation = productPassStationList.get(0); // String boxCode = productNewPassStation.getBoxCode(); // String productType = productNewPassStation.getProductType(); // log.info("发送到OP040的页面数据productType,{}",productType); // log.info("发送到OP040的页面数据boxCode,{}",boxCode); // passingStationCollectionServiceImpl.sendMessage(productType+"*"+boxCode, "OP040"); // } } } } jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -310,6 +310,14 @@ { label:"280", value:"280" }, { label:"196", value:"196" }, { label:"296", value:"296" } ], typeZDateRules: '', jcdm-ui/src/views/main/pr/productResultReport/index.vue
@@ -111,7 +111,7 @@ state: null, paramName: null, unit: null, type: '工位产品结果', type: '', startDate: null, endDate: null, dateConditions: [], @@ -175,7 +175,7 @@ state: null, paramName: null, unit: null, type: '工位产品结果', type: '', }; this.resetForm("form"); },