zss
2023-08-19 6d7b4c2e4c0a1dd15afb71b11c8f3c19ef7c946c
优化
已修改7个文件
60 ■■■■ 文件已修改
standard-server/src/main/java/com/yuanchu/limslaboratory/controller/ProductController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/limslaboratory/controller/SpecificationsController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/limslaboratory/controller/StandardController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/limslaboratory/service/ProductService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ProductServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/ProductMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/resources/mapper/ProductModelMapper.xml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
standard-server/src/main/java/com/yuanchu/limslaboratory/controller/ProductController.java
@@ -38,6 +38,15 @@
        return Result.success(productService.pageProductInformation(specificationsId));
    }
    //@ApiOperation("填写标准值与内控值,鼠标移开保存")
    @ApiOperation("填写标准值与内控值,鼠标移开保存")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "标准项目ID", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "required", value = "标准值", dataTypeClass = String.class, required = true),
            @ApiImplicitParam(name = "internal", value = "内控值", dataTypeClass = String.class, required = true)
    })
    @PostMapping("/write")
    public Result<?> write(Integer id, String required, String internal) {
        return Result.success(productService.write(id, required, internal));
    }
}
standard-server/src/main/java/com/yuanchu/limslaboratory/controller/SpecificationsController.java
@@ -21,7 +21,7 @@
 * @author 江苏鵷雏网络科技有限公司
 * @since 2023-07-11
 */
@Api(tags = "标准库-->3、产品规格")
@Api(tags = "标准库-->3、产品型号")
@RestController
@RequestMapping("/specifications")
public class SpecificationsController {
@@ -41,7 +41,7 @@
    @ApiOperation("删除产品型号")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "specificationsId", value = "规格Id", dataTypeClass = Integer.class, required = true)
            @ApiImplicitParam(name = "specificationsId", value = "型号Id", dataTypeClass = Integer.class, required = true)
    })
    @DeleteMapping("/delete")
    public Result<?> deleteSpecificationsInformation(Integer specificationsId) {
standard-server/src/main/java/com/yuanchu/limslaboratory/controller/StandardController.java
@@ -17,7 +17,7 @@
 * @author 江苏鵷雏网络科技有限公司
 * @since 2023-07-11
 */
@Api(tags = "标准库-->2、标准")
@Api(tags = "标准库-->2、规格(标准)")
@RestController
@RequestMapping("/standards")
public class StandardController {
standard-server/src/main/java/com/yuanchu/limslaboratory/service/ProductService.java
@@ -28,4 +28,14 @@
     * @return
     */
    List<Map<String,Object>> pageProductInformation(Integer specificationsId);
    /**
     * 填写标准值与内控值,鼠标移开保存
     * @param id
     * @param required
     * @param internal
     * @return
     */
    Integer write(Integer id, String required, String internal);
}
standard-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ProductServiceImpl.java
@@ -44,7 +44,7 @@
    @Override
    public void deleteProductInformation(List<Integer> SpecificationsId) {
        for (Integer materialId : SpecificationsId){
        for (Integer materialId : SpecificationsId) {
            LambdaUpdateWrapper<Product> wrapper = new LambdaUpdateWrapper<>();
            wrapper.eq(Product::getSpecifications_id, materialId);
            wrapper.set(Product::getState, 0);
@@ -59,5 +59,16 @@
        return productMapper.pageProductInformation(specificationsId);
    }
    //填写标准值与内控值,鼠标移开保存
    @Override
    public Integer write(Integer id, String required, String internal) {
        Product product = new Product();
        product.setId(id);
        product.setRequired(required);
        product.setInternal(internal);
        productMapper.updateById(product);
        return 1;
    }
}
standard-server/src/main/resources/mapper/ProductMapper.xml
@@ -13,13 +13,14 @@
    <!--展示该型号下的检验项目要求-->
    <select id="pageProductInformation" resultType="java.util.Map">
        select name,
        select id,
               name,
               father,
               unit,
               required,
               internal
        from lims_laboratory.product
        where state=1
        and specifications_id=#{specificationsId}
        where state = 1
          and specifications_id = #{specificationsId}
    </select>
</mapper>
standard-server/src/main/resources/mapper/ProductModelMapper.xml
@@ -1,8 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yuanchu.limslaboratory.mapper.ProductModelMapper">
    <resultMap id="selectproductModelMap" type="map">
        <id property="father" column="father"/>
        <collection property="children" resultMap="selectproductModelTowMap" javaType="List"/>
    </resultMap>
    <resultMap id="selectproductModelTowMap" type="map">
        <id property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="unit" column="unit"/>
    </resultMap>
    <!--查询标准模版列表-->
    <select id="selectproductModel" resultType="java.util.Map">
    <select id="selectproductModel" resultMap="selectproductModelMap">
        select id,
        father,
        name,
@@ -16,7 +26,6 @@
        <if test="father!=null and father!=''">
            and father like concat('%',#{father},'%')
        </if>
        order by father
    </select>
    <update id="delAllproductModel">