18f1836e9aa9adef0a6642167571eb4e59d80823..b0b8ca4b383c5c3a2373200ca1872c20ee9ff999
2023-08-30 XiaoRuby
Merge remote-tracking branch 'origin/master'
b0b8ca 对比 | 目录
2023-08-30 XiaoRuby
8-30 bug修改
030c68 对比 | 目录
2023-08-30 XiaoRuby
Merge remote-tracking branch 'origin/master'
730443 对比 | 目录
2023-08-29 XiaoRuby
8-28 bug修改
2b8767 对比 | 目录
已修改6个文件
71 ■■■■ 文件已修改
inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/RawMaterialController.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/pojo/RawMaterial.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/RawMaterialService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/RawMaterialServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sys/src/main/resources/application-dev.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
user-server/src/main/resources/mapper/UserMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/RawMaterialController.java
@@ -12,9 +12,9 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@@ -53,4 +53,24 @@
        map.put("total", iPage.getTotal());
        return Result.success(map);
    }
    @ApiOperation("原材料报检添加")
    @PostMapping("/add")
    public Result<?> insertRawMaterial(@Validated @RequestBody RawMaterial rawMaterial) {
        Integer integer = rawMaterialService.insertRawMaterial(rawMaterial);
        if (integer >= 1) {
            return Result.success("添加成功");
        }
        return Result.fail("添加失败");
    }
    @ApiOperation("原材料报检删除")
    @PostMapping("/delete")
    public Result<?> deleteRawMaterial(String deleteId) {
        Integer integer = rawMaterialService.deleteRawMaterial(deleteId);
        if (integer >= 1) {
            return Result.success("删除成功");
        }
        return Result.fail("删除失败");
    }
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/pojo/RawMaterial.java
@@ -27,43 +27,42 @@
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键")
    @ApiModelProperty(value = "主键", hidden = true)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "供应商名称")
    @ApiModelProperty(value = "供应商名称", required = true, example = "江苏鵷雏")
    private String supplierName;
    @ApiModelProperty(value = "材料编码")
    @ApiModelProperty(value = "材料编码", required = true, example = "YCL202308290000002")
    private String materialCoding;
    @ApiModelProperty(value = "材料名称")
    @ApiModelProperty(value = "材料名称", required = true, example = "光纤")
    private String materialName;
    @ApiModelProperty(value = "规格型号")
    @ApiModelProperty(value = "规格型号", required = true, example = "GGXH2023")
    private String specificationsModels;
    @ApiModelProperty(value = "单位")
    @ApiModelProperty(value = "单位", required = true, example = "KB")
    private String unit;
    @ApiModelProperty(value = "数量")
    @ApiModelProperty(value = "数量", example = "100", required = true)
    private Integer quantity;
    @ApiModelProperty(value = "报检日期")
    @ApiModelProperty(value = "报检日期", example = "2023-08-29", required = true, dataType = "date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date inspectionDate;
    @ApiModelProperty(value = "检验人")
    @ApiModelProperty(value = "检验人", example = "李华", required = true)
    private String surveyor;
    @ApiModelProperty(value = "检验日期")
    @ApiModelProperty(value = "检验日期", required = true, example = "2023-08-29", dataType = "date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date dateSurvey;
    @ApiModelProperty(value = "状态0:待检测;1:已检测")
    @ApiModelProperty(value = "状态0:待检测;1:已检测", required = true, example = "1")
    private Integer type;
    //    @TableLogic(value = "1", delval = "0")
    @ApiModelProperty(value = "逻辑删除 正常>=1,删除<=0", hidden = true)
    private Integer state;
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/RawMaterialService.java
@@ -32,4 +32,7 @@
    List<Map<String, Object>> selectRawmaAll();
    Integer insertRawMaterial(RawMaterial rawMaterial);
    Integer deleteRawMaterial(String deleteId);
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/RawMaterialServiceImpl.java
@@ -1,6 +1,7 @@
package com.yuanchu.limslaboratory.service.impl;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.limslaboratory.pojo.RawMaterial;
@@ -31,7 +32,6 @@
     * 分页查询
     * @param materialCoding
     * @param materialName
     * @param condition
     * @param createTime
     * @param page
     * @return
@@ -51,5 +51,18 @@
        return rawMaterialMapper.selectRawmaAll();
    }
    @Override
    public Integer insertRawMaterial(RawMaterial rawMaterial) {
        return rawMaterialMapper.insert(rawMaterial);
    }
    @Override
    public Integer deleteRawMaterial(String deleteId) {
        LambdaUpdateWrapper<RawMaterial> updateWrapper = new LambdaUpdateWrapper<>();
        updateWrapper.eq(RawMaterial::getId, deleteId);
        updateWrapper.set(RawMaterial::getState, 0);
        return rawMaterialMapper.update(new RawMaterial(), updateWrapper);
    }
}
sys/src/main/resources/application-dev.yml
@@ -75,7 +75,7 @@
    # redis访问密码(默认为空)
    password: null
    # redis连接超时时间(单位毫秒)
    timeout: 1000
    timeout: 50000
    # redis连接池配置
    pool:
      # 最大可用连接数(默认为8,负数表示无限)
user-server/src/main/resources/mapper/UserMapper.xml
@@ -21,7 +21,7 @@
    <select id="getNewPersonnelPage" resultType="map">
        SELECT u.`id`, u.`name` username, r.`name` roleName, DATE_FORMAT(u.`create_time`, '%Y-%m-%d') createTime,
        u.`age`,
        u.`age`, CONCAT(r.`id`, '') roleId,
        u.`phone`, u.`email`, u.`job_state` jobState, o.`department`, u.`account`, o.`id` departmentId
        FROM `user` u
        LEFT JOIN role r