can not scan other material
| | |
| | | package com.dy.pmsStation.assemblyStep; |
| | | |
| | | import com.alibaba.excel.util.StringUtils; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.pmsGlobal.pojoPlt.PltProductFile; |
| | |
| | | public BaseResponse<Map<String,String>> queryByDeviceNo(String deviceNo) { |
| | | log.info("AssemblyStepCtrl.queryByDeviceNo():"+deviceNo); |
| | | Map<String,String> result = sv.queryByDeviceNo(deviceNo); |
| | | return BaseResponseUtils.buildSuccess(result); |
| | | if(StringUtils.isBlank(result.get("proName"))){ |
| | | return BaseResponseUtils.buildFail("该编码("+deviceNo +")不是主要物料(系统中管控的其他设备)"); |
| | | }else{ |
| | | return BaseResponseUtils.buildSuccess(result); |
| | | } |
| | | } |
| | | |
| | | @GetMapping(path = "queryLifeByDeviceNo") |
| | |
| | | public Map<String,String> queryByDeviceNo(String deviceNo) { |
| | | Map<String,String> map = new HashMap<>(); |
| | | map.put("deviceNo", deviceNo); |
| | | map.put("proName", "-"); |
| | | map.put("proType", "-"); |
| | | map.put("proName", ""); |
| | | map.put("proType", ""); |
| | | |
| | | PltProduct product = productDao.selectByCode(deviceNo.substring(3,6)); |
| | | if(product != null){ |
| | | map.put("proName", product.getName()); |
| | | map.put("proType", product.getType()); |
| | | } |
| | | /*else{ |
| | | throw new RuntimeException("该编码("+deviceNo +")不是主要物料(系统中管控的其他设备)"); |
| | | }*/ |
| | | return map; |
| | | } |
| | | |