| | |
| | | @Override |
| | | public List<StandardProductList> selectStandardProductList(InsSample insSample) { |
| | | String[] models = insSample.getModel().split("-(?=[^-]*$)");//拆分最后一个【-】 |
| | | List<StandardProductList> list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()).eq(StandardProductList::getState, 1).eq(StandardProductList::getModel, models[0])); |
| | | List<StandardProductList> list = standardProductListMapper.selectDetail(insSample.getStandardMethodListId(), 1, models[0]); |
| | | /* List<StandardProductList> list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()) |
| | | .eq(StandardProductList::getState, 1) |
| | | .eq(StandardProductList::getModel, models[0]) |
| | | .apply("ORDER BY case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED), man_hour_group REGEXP '^[0-9]', id asc "));*/ |
| | | if (list.size() == 0) { |
| | | if(Objects.equals(insSample.getFactory(), "") || insSample.getFactory() == null){ |
| | | return null; |
| | | } |
| | | String[] split = insSample.getFactory().split(" - "); |
| | | list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3]); |
| | | /*list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()) |
| | | .eq(StandardProductList::getState, 1) |
| | | .like(StandardProductList::getTree, split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3])); |
| | | .like(StandardProductList::getTree, split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3]) |
| | | .apply("ORDER BY case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED), man_hour_group REGEXP '^[0-9]', id asc "));*/ |
| | | } |
| | | list = list.stream().filter(a -> { |
| | | try { |