LIMS管理系统框架-开发7-27第二次标准库完成修改
| | |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageNo", value = "起始页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "pageSize", value = "每一页数量", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "specificationsId", value = "规格型号ID", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(value = "原材料编码/原材料名称", name = "productCodeOrName", dataTypeClass = String.class) |
| | | }) |
| | | @GetMapping("/page") |
| | | public Result<?> pageProductInformation(Integer pageNo, Integer pageSize,String productCodeOrName) { |
| | | IPage<Map<String, Object>> maps = productService.pageProductInformation(productCodeOrName, new Page<Objects>(pageNo, pageSize)); |
| | | public Result<?> pageProductInformation(Integer pageNo, Integer pageSize, Integer specificationsId, String productCodeOrName) { |
| | | IPage<Map<String, Object>> maps = productService.pageProductInformation(productCodeOrName, specificationsId, new Page<Objects>(pageNo, pageSize)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("row", maps.getRecords()); |
| | | map.put("total", maps.getTotal()); |
| | |
| | | |
| | | List<Product> selectProductByMaterialId(String materialId); |
| | | |
| | | IPage<Map<String, Object>> pageProductInformation(String productCodeOrName, Page<Objects> page); |
| | | IPage<Map<String, Object>> pageProductInformation(String productCodeOrName, Integer specificationsId, Page<Objects> page); |
| | | |
| | | Map<String, Object> selectOneChildren(Object father); |
| | | } |
| | |
| | | public interface ProductService extends IService<Product> { |
| | | void deleteProductInformation(List<Integer> SpecificationsId); |
| | | |
| | | IPage<Map<String, Object>> pageProductInformation(String productCodeOrName, Page<Objects> page); |
| | | IPage<Map<String, Object>> pageProductInformation(String productCodeOrName, Integer specificationsId, Page<Objects> page); |
| | | |
| | | List<Map<String, Object>> pageFatherNameProductInformation(String fatherName); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> pageProductInformation(String productCodeOrName, Page<Objects> page) { |
| | | IPage<Map<String, Object>> iPage = productMapper.pageProductInformation(productCodeOrName, page); |
| | | public IPage<Map<String, Object>> pageProductInformation(String productCodeOrName, Integer specificationsId, Page<Objects> page) { |
| | | IPage<Map<String, Object>> iPage = productMapper.pageProductInformation(productCodeOrName, specificationsId, page); |
| | | List<Map<String, Object>> maps = iPage.getRecords(); |
| | | MyUtil.PrintLog(maps.toString()); |
| | | maps.forEach(map -> { |
| | |
| | | <select id="pageProductInformation" resultType="map"> |
| | | SELECT COUNT(1) num, p.`father` |
| | | FROM product p |
| | | WHERE p.`specifications_id` = #{specificationsId} |
| | | <if test="productCodeOrName != null and productCodeOrName != ''"> |
| | | WHERE p.`father` = #{productCodeOrName} |
| | | AND p.`father` = #{productCodeOrName} |
| | | </if> |
| | | GROUP BY p.`father` |
| | | </select> |