| | |
| | | private MatService matService; |
| | | |
| | | @Override |
| | | public LocRule find(String matnr, String batch) { |
| | | public LocRule find(String matnr, String batch, int startRow, int endRow) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | |
| | | } |
| | | LocRule locRule = null; |
| | | do { |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("matnr", matnr).eq("status", 1)); |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("matnr", matnr).ge("row_beg", startRow).le("row_end", endRow).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("specs", mat.getSpecs()).eq("status", 1)); |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("specs", mat.getSpecs()).ge("row_beg", startRow).le("row_end", endRow).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("model", mat.getModel()).eq("status", 1)); |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("model", mat.getModel()).ge("row_beg", startRow).le("row_end", endRow).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("batch", batch).eq("status", 1)); |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("batch", batch).ge("row_beg", startRow).le("row_end", endRow).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |