| | |
| | | import com.vincent.rsf.server.manager.entity.StockItem; |
| | | import com.vincent.rsf.server.manager.service.StockItemService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @Api(tags = "库存明细") |
| | | @RestController |
| | | public class StockItemController extends BaseController { |
| | | |
| | |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<StockItem> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(StockItem::getMatnrk, condition); |
| | | wrapper.like(StockItem::getMaktx, condition); |
| | | } |
| | | stockItemService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getMatnrk())) |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getMaktx())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |