| | |
| | | return map; |
| | | } |
| | | StringBuilder checkItemQueryTree = new StringBuilder(); // 检查项查询 |
| | | StringBuilder productTree = new StringBuilder(); // 检验产品树 |
| | | // 判断是否包含车间 |
| | | boolean existWorkShopFlag = this.existWorkShop(tree); |
| | | // 车间层级多一层级 |
| | |
| | | case 7: |
| | | sampleType = trees[4]; |
| | | checkItemQueryTree.append("\"").append(trees[4]).append("\",\"").append(trees[5]).append("\",\"").append(trees[6]).append("\""); |
| | | productTree.append("\"").append(trees[4]).append("\",\"").append(trees[5]).append("\""); |
| | | break; |
| | | case 6: |
| | | sampleType = trees[4]; |
| | |
| | | case 6: |
| | | sampleType = trees[3]; |
| | | checkItemQueryTree.append("\"").append(trees[3]).append("\",\"").append(trees[4]).append("\",\"").append(trees[5]).append("\""); |
| | | productTree.append("\"").append(trees[3]).append("\",\"").append(trees[4]).append("\""); |
| | | break; |
| | | case 5: |
| | | sampleType = trees[3]; |
| | |
| | | List<StandardMethodList> standardMethodListArray = standardMethodListMapper.selectStandardMethodLists(checkItemQueryTree.toString()); |
| | | // 查不到查询检查对象 |
| | | if(CollectionUtils.isEmpty(standardMethodListArray)){ |
| | | standardMethodListArray = standardMethodListMapper.selectStandardMethodLists(sampleType); |
| | | // 如果是完整层级,向上推到产品层级 |
| | | if((existWorkShopFlag&&trees.length == 7) || (!existWorkShopFlag&&trees.length == 6)){ |
| | | standardMethodListArray = standardMethodListMapper.selectStandardMethodLists(productTree.toString()); |
| | | |
| | | } |
| | | // 还是为空查询对象层级 |
| | | if(CollectionUtils.isEmpty(standardMethodListArray)){ |
| | | standardMethodListArray = standardMethodListMapper.selectStandardMethodLists(sampleType); |
| | | } |
| | | } |
| | | map.put("standardMethodList", standardMethodListArray); |
| | | return map; |