XiaoRuby
2023-07-27 b7145c10db0d3ace368689edfebb850760632c79
LIMS管理系统框架-开发7-27第二次标准库完成修改
已修改5个文件
16 ■■■■■ 文件已修改
standard-server/src/main/java/com/yuanchu/limslaboratory/controller/ProductController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/limslaboratory/mapper/ProductMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/limslaboratory/service/ProductService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ProductServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/ProductMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/limslaboratory/controller/ProductController.java
@@ -33,11 +33,12 @@
    @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());
standard-server/src/main/java/com/yuanchu/limslaboratory/mapper/ProductMapper.java
@@ -22,7 +22,7 @@
    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);
}
standard-server/src/main/java/com/yuanchu/limslaboratory/service/ProductService.java
@@ -21,7 +21,7 @@
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);
}
standard-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ProductServiceImpl.java
@@ -45,8 +45,8 @@
    }
    @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 -> {
standard-server/src/main/resources/mapper/ProductMapper.xml
@@ -5,8 +5,9 @@
    <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>