| | |
| | | public R stockOutList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | return R.ok(locDetlService.getStockOut(new Page<LocDetl>(curr, limit).setCondition(param))); |
| | | return R.ok(locDetlService.getStockOut(toPage(curr, limit, param))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/list/auth") |
| | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface LocDetlMapper extends BaseMapper<LocDetl> { |
| | | |
| | | List<LocDetl> getStockOutPage(@Param("pageNumber")int pageNumber, @Param("pageSize")int pageSize, @Param("loc_no") Object loc_no, @Param("matnr") Object matnr); |
| | | List<LocDetl> getStockOutPage(Map<String, Object> map); |
| | | |
| | | Integer getStockOutPageCount(@Param("loc_no") Object loc_no, @Param("matnr") Object matnr); |
| | | Integer getStockOutPageCount(Map<String, Object> map); |
| | | |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Page<LocDetl> getStockOut(Page<LocDetl> page) { |
| | | page.setRecords(baseMapper.getStockOutPage(page.getCurrent(), page.getSize() |
| | | , page.getCondition().get("loc_no"), page.getCondition().get("matnr"))); |
| | | page.setTotal(baseMapper.getStockOutPageCount(page.getCondition().get("loc_no"), page.getCondition().get("matnr"))); |
| | | page.setRecords(baseMapper.getStockOutPage(page.getCondition())); |
| | | page.setTotal(baseMapper.getStockOutPageCount(page.getCondition())); |
| | | return page; |
| | | } |
| | | |
| | |
| | | |
| | | protected <T> Page<T> toPage(Integer curr, Integer limit, Map<String, Object> param){ |
| | | Page<T> page = new Page<T>(curr, limit); |
| | | |
| | | param.entrySet().removeIf(next -> next.getKey().equals("curr") |
| | | || next.getKey().equals("limit") |
| | | || next.getKey().equals("orderByField") |
| | | || next.getKey().equals("orderByType") |
| | | || Cools.isEmpty(next.getValue())); |
| | | param.put("pageNumber", Integer.parseInt(String.valueOf(param.get("curr")))); |
| | | param.put("pageSize", Integer.parseInt(String.valueOf(param.get("limit")))); |
| | | page.setCondition(param); |
| | | return page; |
| | | } |
| | | |
| | |
| | | mapper-locations: classpath:mapper/*.xml |
| | | # global-config: |
| | | # field-strategy: 0 |
| | | # configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | logging: |
| | | path: /stock/out/logs |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="mat_name" placeholder="物料名称" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="maktx" placeholder="物料描述" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |