| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "线边库物料信息-根据物料类型查询", notes = "线边库物料信息-根据物料类型查询") |
| | | @GetMapping(value = "/queryByMaterialCategory") |
| | | public Result<List<LswMaterial>> queryByMaterialCategory(@RequestParam("materialCategory") String materialCategory) { |
| | | if (StringUtils.isBlank(materialCategory)) { |
| | | return Result.ok(Collections.emptyList()); |
| | | } |
| | | String[] split = materialCategory.split(","); |
| | | LambdaQueryWrapper<LswMaterial> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(LswMaterial::getMaterialCategory, materialCategory); |
| | | queryWrapper.in(LswMaterial::getMaterialCategory, Arrays.asList(split)); |
| | | queryWrapper.eq(LswMaterial::getDelFlag, CommonConstant.DEL_FLAG_0); |
| | | queryWrapper.eq(LswMaterial::getMaterialStatus, CommonConstant.STATUS_1); |
| | | queryWrapper.orderByAsc(LswMaterial::getMaterialNumber); |