| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * Created by vincent on 2022/4/9 |
| | |
| | | callApiLogSaveMES(param, null, param.getBarcode() + ":工作明细档已存在此数据", false); |
| | | throw new CoolException("工作明细档已存在此数据===>>" + param.getBarcode()); |
| | | } |
| | | List<CombParam.CombMat> combMats = param.getCombMats(); |
| | | Map<String, String> map = new HashMap<>(); |
| | | for (CombParam.CombMat combMat : combMats) { |
| | | String batch = Cools.isEmpty(combMat.getBatch()) ? "" : combMat.getBatch(); |
| | | if (!Cools.isEmpty(map.get(combMat.getMatnr() + batch))) { |
| | | throw new CoolException(param.getBarcode() + "组托的物料明细重复,请检查是否重复扫码"); |
| | | } else { |
| | | map.put(combMat.getMatnr() + batch, combMat.getMatnr()); |
| | | } |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | try{ |