| | |
| | | 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)); |
| | | } |
| | | |
| | | } |
| | |
| | | * @author 江苏鵷雏网络科技有限公司 |
| | | * @since 2023-07-11 |
| | | */ |
| | | @Api(tags = "标准库-->3、产品规格") |
| | | @Api(tags = "标准库-->3、产品型号") |
| | | @RestController |
| | | @RequestMapping("/specifications") |
| | | public class SpecificationsController { |
| | |
| | | |
| | | @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) { |
| | |
| | | * @author 江苏鵷雏网络科技有限公司 |
| | | * @since 2023-07-11 |
| | | */ |
| | | @Api(tags = "标准库-->2、标准") |
| | | @Api(tags = "标准库-->2、规格(标准)") |
| | | @RestController |
| | | @RequestMapping("/standards") |
| | | public class StandardController { |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> pageProductInformation(Integer specificationsId); |
| | | |
| | | /** |
| | | * 填写标准值与内控值,鼠标移开保存 |
| | | * @param id |
| | | * @param required |
| | | * @param internal |
| | | * @return |
| | | */ |
| | | Integer write(Integer id, String required, String internal); |
| | | |
| | | } |
| | |
| | | |
| | | @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); |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <!--展示该型号下的检验项目要求--> |
| | | <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> |
| | |
| | | <?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, |
| | |
| | | <if test="father!=null and father!=''"> |
| | | and father like concat('%',#{father},'%') |
| | | </if> |
| | | order by father |
| | | </select> |
| | | |
| | | <update id="delAllproductModel"> |