Fixiaobai
2023-08-10 9ddb32175b3624ba3a3cedbfc009d9d526391a20
Merge branch 'master' of http://192.168.110.209:9001/r/lims-after
已修改7个文件
已添加17个文件
1129 ■■■■ 文件已修改
.idea/compiler.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/misc.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/InspectionController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/PlanController.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/ReportAuditingController.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/ReportController.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/mapper/PlanMapper.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/mapper/ReportMapper.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/pojo/Report.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/pojo/vo/PlanVo.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/pojo/vo/ReportAuditingVo.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/pojo/vo/ReportVo.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/PlanService.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/ReportAuditingService.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/ReportService.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/PlanServiceImpl.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ReportAuditingServiceImpl.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ReportServiceImpl.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/resources/mapper/LinkBasicInformationMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/resources/mapper/PlanMapper.xml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspection-server/src/main/resources/mapper/ReportMapper.xml 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sql/lims.sql 376 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sys/src/test/java/com/yuanchu/limslaboratory/SysApplicationTests.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/compiler.xml
@@ -2,6 +2,7 @@
<project version="4">
  <component name="CompilerConfiguration">
    <annotationProcessing>
      <profile default="true" name="Default" enabled="true" />
      <profile name="Maven default annotation processors profile" enabled="true">
        <sourceOutputDir name="target/generated-sources/annotations" />
        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
.idea/misc.xml
@@ -8,5 +8,7 @@
      </list>
    </option>
  </component>
  <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK" />
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/out" />
  </component>
</project>
inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/InspectionController.java
@@ -7,6 +7,7 @@
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.yuanchu.limslaboratory.pojo.Inspection;
import com.yuanchu.limslaboratory.pojo.Report;
import com.yuanchu.limslaboratory.pojo.vo.InspectionVo;
import com.yuanchu.limslaboratory.service.LinkBasicInformationService;
import com.yuanchu.limslaboratory.service.RawMaterialService;
@@ -136,7 +137,6 @@
        }
        return Result.success(inspectionService.updateInspectsById(id));
    }
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/PlanController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
package com.yuanchu.limslaboratory.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.limslaboratory.pojo.vo.PlanVo;
import com.yuanchu.limslaboratory.service.PlanService;
import com.yuanchu.limslaboratory.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.*;
/**
 * <p>
 * å‰ç«¯æŽ§åˆ¶å™¨
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-08-09
 */
@Api(tags = "检验模块-->检验计划")
@RestController
@RequestMapping("/plan")
public class PlanController {
    @Resource
    private PlanService planService;
    @ApiOperation("查询检验计划")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "deviceId", value = "设备名称Id", dataTypeClass = Integer.class),
            @ApiImplicitParam(name = "beginTime", value = "检验开始时间", dataTypeClass = Date.class),
            @ApiImplicitParam(name = "endTime", value = "检验结束时间", dataTypeClass = Date.class),
            @ApiImplicitParam(name = "userId", value = "检验人", dataTypeClass = Integer.class)
    })
    @GetMapping("/selectAllPlan")
    public Result selectAllPlan(Integer deviceId, @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime, Integer userId) {
        List<PlanVo> planVoList = planService.selectAllPlan(deviceId, beginTime, endTime, userId);
        return Result.success(planVoList);
    }
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/ReportAuditingController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
package com.yuanchu.limslaboratory.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.limslaboratory.pojo.vo.ReportAuditingVo;
import com.yuanchu.limslaboratory.service.ReportAuditingService;
import com.yuanchu.limslaboratory.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
/**
 * <p>
 * å‰ç«¯æŽ§åˆ¶å™¨
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-08-07
 */
@Api(tags = "检验模块-->报告审核")
@RestController
@RequestMapping("/reportAuditing")
public class ReportAuditingController {
    /**
     * æœåŠ¡å¯¹è±¡
     */
    @Resource
    private ReportAuditingService reportAuditingService;
    @ApiOperation("查询报告审核内容")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "page", value = "初始页", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "pageSize", value = "每一页数量", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "status", value = "状态(为空=全部)", dataTypeClass = Integer.class),
            @ApiImplicitParam(name = "name", value = "搜索信息", dataTypeClass = String.class)
    })
    @GetMapping("/selectAllReportAuditing")
    public Result selectAllReportCheck(Integer page, Integer pageSize, Integer status, String name) {
        IPage<ReportAuditingVo> reportPage = reportAuditingService.selectAllReportAuditing(new Page<Object>(page, pageSize), status, name);
        Map<String, Object> map = new HashMap<>();
        map.put("total", reportPage.getTotal());
        map.put("row", reportPage.getRecords());
        return Result.success(map);
    }
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/ReportController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,58 @@
package com.yuanchu.limslaboratory.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.limslaboratory.pojo.vo.ReportVo;
import com.yuanchu.limslaboratory.service.ReportService;
import com.yuanchu.limslaboratory.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
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 javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
/**
 * <p>
 * å‰ç«¯æŽ§åˆ¶å™¨
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-08-07
 */
@Api(tags = "检验模块-->检验报告")
@RestController
@RequestMapping("/report")
public class ReportController {
    /**
     * æœåŠ¡å¯¹è±¡
     */
    @Resource
    private ReportService reportService;
    @ApiOperation("查询检验报告")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "page", value = "初始页", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "pageSize", value = "每一页数量", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "status", value = "状态(为空=全部)", dataTypeClass = Integer.class),
            @ApiImplicitParam(name = "name", value = "搜索信息", dataTypeClass = String.class)
    })
    @GetMapping("/selectAllReport")
    public Result selectAllReport(Integer page, Integer pageSize, Integer status, String name) {
        IPage<ReportVo> reportPage = reportService.selectAllReport(new Page<Object>(page, pageSize), status, name);
        Map<String, Object> map = new HashMap<>();
        map.put("total", reportPage.getTotal());
        map.put("row", reportPage.getRecords());
        return Result.success(map);
    }
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/mapper/PlanMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
package com.yuanchu.limslaboratory.mapper;
import com.yuanchu.limslaboratory.pojo.vo.PlanVo;
import java.util.Date;
import java.util.List;
public interface PlanMapper {
    /**
     * æŸ¥è¯¢æ£€éªŒè®¡åˆ’
     * @return
     */
    List<PlanVo> selectAllPlan(Integer deviceId, Date beginTime, Date endTime, Integer userId);
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/mapper/ReportMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
package com.yuanchu.limslaboratory.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.limslaboratory.pojo.Report;
import com.yuanchu.limslaboratory.pojo.vo.ReportAuditingVo;
import com.yuanchu.limslaboratory.pojo.vo.ReportVo;
/**
 * <p>
 *  Mapper æŽ¥å£
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-08-07
 */
public interface ReportMapper extends BaseMapper<Report> {
    /**
     * æŸ¥è¯¢æ£€éªŒæŠ¥å‘Š
     * @return
     */
    IPage<ReportVo> selectAllReport(Page<Object> page, Integer status, String name);
    /**
     * æŸ¥è¯¢æŠ¥å‘Šå®¡æ ¸
     * @return
     */
    IPage<ReportAuditingVo> selectAllReportAuditing(Page<Object> page, Integer status, String name);
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/pojo/Report.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
package com.yuanchu.limslaboratory.pojo;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
 * <p>
 *
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-08-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Report对象", description="")
@TableName("report")
public class Report implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "报告表id", hidden = true)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "报告单号")
    private String code;
    @ApiModelProperty(value = "审批状态")
    private Integer status;
    @ApiModelProperty(value = "审核结论")
    private String conclusion;
    @ApiModelProperty(value = "审核人")
    private String approver;
    @ApiModelProperty(value = "关联 ç”³è¯·è¡¨id")
    private Integer inspectionId;
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/pojo/vo/PlanVo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
package com.yuanchu.limslaboratory.pojo.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * æ£€éªŒè®¡åˆ’VO
 */
@Data
public class PlanVo {
    @ApiModelProperty(value = "设备名称")
    @JsonSerialize
    private String device;
    @ApiModelProperty(value = "样品名称")
    @JsonSerialize
    private String samplename;
    @ApiModelProperty(value = "样品编号")
    @JsonSerialize
    private String sampleid;
    @ApiModelProperty(value = "规格型号")
    @JsonSerialize
    private String modelandspecification;
    @ApiModelProperty(value = "单位")
    @JsonSerialize
    private String unit;
    @ApiModelProperty(value = "数量")
    @JsonSerialize
    private Integer amount;
    @ApiModelProperty(value = "检验项目")
    @JsonSerialize
    private String checkproject;
    @ApiModelProperty(value = "检验人")
    @JsonSerialize
    private String checker;
    @ApiModelProperty(value = "计划工期")
    @JsonSerialize
    private Integer duration;
    @ApiModelProperty(value = "检验进度0:未分配, 50:检验中, 100:已完成")
    @JsonSerialize
    private Integer progress;
    @ApiModelProperty(value = "计划开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date starttime;
    @ApiModelProperty(value = "计划结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date finishtime;
    @ApiModelProperty(value = "设备id")
    @JsonSerialize
    private Integer deviceId;
    @ApiModelProperty(value = "检验人id")
    @JsonSerialize
    private Integer userId;
    //判断项目状态
    private Integer state;
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/pojo/vo/ReportAuditingVo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
package com.yuanchu.limslaboratory.pojo.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * æŠ¥å‘Šå®¡æ ¸
 */
@Data
public class ReportAuditingVo {
    @ApiModelProperty(value = "样品编号")
    @JsonSerialize
    private String materialCode;
    @ApiModelProperty(value = "报告单号")
    @JsonSerialize
    private String reportCode;
    @ApiModelProperty(value = "样品名称")
    @JsonSerialize
    private String materialName;
    @ApiModelProperty(value = "审批状态 0:待提交 1:待通过")
    @JsonSerialize
    private Integer status;
    @ApiModelProperty(value = "审批人")
    @JsonSerialize
    private Integer approver;
    @ApiModelProperty(value = "提交日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date submitTime;
    @ApiModelProperty(value = "审核日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date checkTime;
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/pojo/vo/ReportVo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
package com.yuanchu.limslaboratory.pojo.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * æ£€éªŒæŠ¥å‘Š
 */
@Data
public class ReportVo {
    @ApiModelProperty(value = "样品编号")
    @JsonSerialize
    private String materialCode;
    @ApiModelProperty(value = "报告单号")
    @JsonSerialize
    private String reportCode;
    @ApiModelProperty(value = "申请单号")
    @JsonSerialize
    private String inspectionCode;
    @ApiModelProperty(value = "审批人")
    @JsonSerialize
    private Integer approver;
    @ApiModelProperty(value = "审批状态 0:待提交 1:待审核;2:已审核")
    @JsonSerialize
    private Integer status;
    @ApiModelProperty(value = "检验结论")
    @JsonSerialize
    private String conclusion;
    @ApiModelProperty(value = "编制人")
    @JsonSerialize
    private String name;
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/PlanService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
package com.yuanchu.limslaboratory.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.limslaboratory.pojo.vo.PlanVo;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
 * <p>
 *  æœåŠ¡ç±»
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-08-09
 */
public interface PlanService {
    /**
     * æŸ¥è¯¢æ£€éªŒè®¡åˆ’
     * @return
     */
    List<PlanVo> selectAllPlan(Integer deviceId, Date beginTime, Date endTime, Integer userId);
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/ReportAuditingService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package com.yuanchu.limslaboratory.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.limslaboratory.pojo.Report;
import com.yuanchu.limslaboratory.pojo.vo.ReportAuditingVo;
/**
 * <p>
 * æœåŠ¡ç±»
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-08-07
 */
public interface ReportAuditingService extends IService<Report> {
    /**
     * é¡¹ç›®å®¡æ ¸è¡¨æŸ¥è¯¢
     * @return
     */
    IPage<ReportAuditingVo> selectAllReportAuditing(Page<Object> page, Integer status, String name);
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/ReportService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
package com.yuanchu.limslaboratory.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.limslaboratory.pojo.Report;
import com.yuanchu.limslaboratory.pojo.vo.ReportVo;
/**
 * <p>
 * æœåŠ¡ç±»
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-08-07
 */
public interface ReportService extends IService<Report> {
    /**
     * æŸ¥è¯¢æ£€éªŒæŠ¥å‘Š
     *
     * @return
     */
    IPage<ReportVo> selectAllReport(Page<Object> page, Integer status, String name);
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java
@@ -13,6 +13,7 @@
import com.yuanchu.limslaboratory.pojo.vo.InspectDetailVo;
import com.yuanchu.limslaboratory.pojo.vo.InspectionVo;
import com.yuanchu.limslaboratory.service.*;
import com.yuanchu.limslaboratory.utils.MyUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@@ -58,6 +59,9 @@
    @Resource
    UserMapper userMapper;
    @Resource
    ReportMapper reportMapper;
    /**
     * æŸ¥è¯¢æ£€éªŒç”³è¯·å•列表
@@ -192,6 +196,22 @@
                .build();
        inspectionMapper.updateById(inspection);
        //生成报告单
        Report report = new Report();
        //生成报告单号
        String code = MyUtil.getTimeSixNumberCode("BG");
        //获取检验结论
        String conclusion = "";
        Inspection inspection1 = inspectionMapper.selectById(id);
        if (inspection1.getInspectionStatus().equals(1)) {
            conclusion = "合格";
        }else {
            conclusion = "不合格";
        }
        report.setCode(code);
        report.setStatus(0);
        report.setConclusion(conclusion);
        report.setInspectionId(id);
        reportMapper.insert(report);
        return true;
    }
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/PlanServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.yuanchu.limslaboratory.service.impl;
import com.yuanchu.limslaboratory.mapper.PlanMapper;
import com.yuanchu.limslaboratory.pojo.vo.PlanVo;
import com.yuanchu.limslaboratory.service.PlanService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
 * <p>
 * æœåŠ¡å®žçŽ°ç±»
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-08-09
 */
@Service
public class PlanServiceImpl implements PlanService {
    @Resource
    private PlanMapper planMapper;
    /**
     * æŸ¥è¯¢æ£€éªŒè®¡åˆ’
     *
     * @return
     */
    @Override
    public List<PlanVo> selectAllPlan(Integer deviceId, Date beginTime, Date endTime, Integer userId) {
        //获取数据库数据
        List<PlanVo> planVos = planMapper.selectAllPlan(deviceId, beginTime, endTime, userId);
        //添加计划工期和检验进度
        planVos.forEach(planVo -> {
            //添加检验进度
            //判断是否是已完成
            if (planVo.getState() != null) {
                planVo.setProgress(100);
            }
            //判断是否是未分配
            if (planVo.getCheckproject() == null) {
                planVo.setProgress(0);
            }
            //判断是否是进行中
            if (planVo.getState() == null && planVo.getCheckproject() != null) {
                planVo.setProgress(50);
            }
            //添加计划工期
            if (planVo.getFinishtime() != null && planVo.getStarttime() != null) {
                long startTimeInMillis = planVo.getStarttime().getTime();
                long endTimeInMillis = planVo.getFinishtime().getTime();
                long durationInMillis = endTimeInMillis - startTimeInMillis;
                long duration = durationInMillis / (1000 * 60 * 60);
                planVo.setDuration(Integer.valueOf((int) duration));
            }
        });
        return planVos;
    }
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ReportAuditingServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package com.yuanchu.limslaboratory.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.limslaboratory.mapper.ReportMapper;
import com.yuanchu.limslaboratory.pojo.Report;
import com.yuanchu.limslaboratory.pojo.vo.ReportAuditingVo;
import com.yuanchu.limslaboratory.service.ReportAuditingService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
 * <p>
 * æœåŠ¡å®žçŽ°ç±»
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-08-07
 */
@Service
public class ReportAuditingServiceImpl extends ServiceImpl<ReportMapper, Report> implements ReportAuditingService {
    @Resource
    private ReportMapper reportMapper;
    /**
     * é¡¹ç›®å®¡æ ¸è¡¨æŸ¥è¯¢
     * @return
     */
    @Override
    public IPage<ReportAuditingVo> selectAllReportAuditing(Page<Object> page, Integer status, String name) {
        return reportMapper.selectAllReportAuditing(page, status, name);
    }
}
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ReportServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
package com.yuanchu.limslaboratory.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.limslaboratory.mapper.ReportMapper;
import com.yuanchu.limslaboratory.pojo.Report;
import com.yuanchu.limslaboratory.pojo.vo.ReportVo;
import com.yuanchu.limslaboratory.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
 * <p>
 * æœåŠ¡å®žçŽ°ç±»
 * </p>
 *
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2023-08-07
 */
@Service
public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> implements ReportService {
    @Resource
    private ReportMapper reportMapper;
    /**
     * æŸ¥è¯¢æ£€éªŒæŠ¥å‘Š
     * @return
     */
    @Override
    public IPage<ReportVo> selectAllReport(Page<Object> page, Integer status, String name) {
        return reportMapper.selectAllReport(page, status, name);
    }
}
inspection-server/src/main/resources/mapper/LinkBasicInformationMapper.xml
@@ -4,7 +4,8 @@
    <select id="getLinkBasicPage" resultType="map">
        SELECT l.`id`, l.`entrust_coding`, l.`entrusted`, d.`samples_number`, d.`sample_name`, d.`specifications_models`,
            DATE_FORMAT(l.`inspection_time`,'%Y-%m-%d') inspectionTime, DATE_FORMAT(l.`completion_deadline`,'%Y-%m-%d') inspectionTime, l.`contacts`, d.`date_survey`, d.`inspection_status`
            DATE_FORMAT(l.`inspection_time`,'%Y-%m-%d') inspectionTime, DATE_FORMAT(l.`completion_deadline`,'%Y-%m-%d') completionDeadline, l.`contacts`,
            DATE_FORMAT(d.`date_survey`,'%Y-%m-%d') dateSurvey, d.`inspection_status`
        FROM link_basic_information l, link_detection d
        WHERE l.`id` = d.`link_basic_id`
        AND l.`state` = 1
inspection-server/src/main/resources/mapper/PlanMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
<?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.PlanMapper">
    <!--查询检验计划-->
    <select id="selectAllPlan" resultType="com.yuanchu.limslaboratory.pojo.vo.PlanVo">
        select i.equipment_name device,
        im.name samplename,
        im.code sampleid,
        im.specifications modelandspecification,
        im.unit unit,
        im.num amount,
        ip.name checkproject,
        u.name checker,
        ip.start_time starttime,
        ip.end_time finishtime,
        i.id deviceId,
        u.id userId,
        ip.test_state state
        from instrument i
        left join (select ip.*
        from inspection_product ip
        right join (select instrument_id, max(ip.end_time) t
        from inspection_product ip
        group by instrument_id) it
        on ip.instrument_id = it.instrument_id and ip.end_time = it.t) ip
        on i.id = ip.instrument_id
        left join inspection_material im on im.id = ip.inspection_material_id
        left join user u on u.id = ip.user_id
        <where>
            <if test="deviceId != null">
                and i.id = #{deviceId}
            </if>
            <if test="userId != null">
                and u.id = #{userId}
            </if>
            <if test="beginTime != null and endTime != null">
                and ip.start_time between #{beginTime} and #{endTime}
            </if>
        </where>
    </select>
</mapper>
inspection-server/src/main/resources/mapper/ReportMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
<?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.ReportMapper">
    <!--查询检验报告-->
    <select id="selectAllReport" resultType="com.yuanchu.limslaboratory.pojo.vo.ReportVo">select im.code materialCode,
        r.code reportCode,
        i.code inspectionCode,
        r.approver approver,
        r.status status,
        r.conclusion conclusion,
        u.name name
        from report r
        join inspection i on r.inspection_id = i.id
        join user u on i.user_id = u.id
        join inspection_material im on i.id = im.inspection_id
        <where>
            <if test="status != null">
                and r.status = #{status}
            </if>
            <if test="name != null and name != ''">
                and im.code like concat('%', #{name}, '%')
                or i.code like concat('%', #{name}, '%')
                or r.code like concat('%', #{name}, '%')
            </if>
        </where>
    </select>
    <!--查询报告审核-->
    <select id="selectAllReportAuditing" resultType="com.yuanchu.limslaboratory.pojo.vo.ReportAuditingVo">
        select im.code materialCode,
        r.code reportCode,
        im.name materialName,
        r.status status,
        r.approver approver,
        DATE_FORMAT(r.`create_time`, '%Y-%m-%d') submitTime,
        DATE_FORMAT(r.`check_time`, '%Y-%m-%d') checkTime
        from report r
        join inspection i on r.inspection_id = i.id
        join inspection_material im on i.id = im.inspection_id
        <where>
            <if test="status == null">
                and r.status in (0, 1)
            </if>
            <if test="status != null">
                and r.status = #{status}
            </if>
            <if test="name != null and name != ''">
                and im.code like concat('%', #{name}, '%')
                or i.code like concat('%', #{name}, '%')
                or im.name like concat('%', #{name}, '%')
            </if>
        </where>
    </select>
</mapper>
sql/lims.sql
@@ -29,7 +29,7 @@
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `version` int(1) NOT NULL DEFAULT '1' COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4;
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;
/*Data for the table `classify` */
@@ -39,7 +39,8 @@
(5,'体温',NULL,1,'2023-07-21 10:53:32','2023-07-21 10:53:32',1),
(10,'体温','体温',0,'2023-07-21 11:16:51','2023-07-21 13:45:52',1),
(12,'体温','体温计',1,'2023-07-21 11:16:51','2023-07-21 11:16:51',1),
(13,'体温','体温',1,'2023-07-21 13:50:52','2023-07-21 13:50:52',1);
(14,'温度测量仪表','体温枪',1,'2023-07-27 09:35:26','2023-07-27 09:35:26',1),
(15,'温度测量仪1表','体温计',1,'2023-08-04 11:29:26','2023-08-04 11:29:26',1);
/*Table structure for table `enterprise` */
@@ -79,40 +80,35 @@
  `state` int(11) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  `version` int(11) DEFAULT '1' COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
/*Data for the table `equipment_point` */
insert  into `equipment_point`(`id`,`instrument_id`,`user_id`,`equipment_point`,`equipment_point_name`,`unit`,`descriptiveness`,`create_time`,`update_time`,`state`,`version`) values 
(1,1,7,'Area-1','导体屏蔽(壁厚面积)','mm','疯了,做不了','2023-07-24 14:40:01','2023-07-24 17:23:15',1,1),
(2,1,7,'Area-2','导体屏蔽(壁厚面积)','mm','太困了','2023-07-24 14:40:01','2023-07-24 15:03:44',1,1);
(2,1,7,'Area-2','导体屏蔽(壁厚面积)','mm','太困了','2023-07-24 14:40:01','2023-07-24 15:03:44',1,1),
(3,1,7,'Area-3','导体屏蔽(壁厚面积)','mm','','2023-07-26 13:55:28','2023-07-24 08:00:00',1,1),
(4,2,7,'Area-6','导体屏蔽(壁厚面积)','mm','','2023-07-27 15:06:06','2023-07-24 08:00:00',1,1);
/*Table structure for table `inspection` */
DROP TABLE IF EXISTS `inspection`;
CREATE TABLE `inspection` (
  `id` varchar(25) NOT NULL COMMENT '报检编号',
  `type` int(1) NOT NULL COMMENT '0:原材料;1:产品;2:半成品;',
  `inspection_status` int(1) NOT NULL DEFAULT '0' COMMENT '报检状态 1:已检验;0未检验',
  `qualified_state` int(1) DEFAULT NULL COMMENT '是否合格 1:是;0否',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '1:待提交;2:已提交;0:已作废',
  `create_time` datetime NOT NULL COMMENT '报检时间',
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '申请单编号',
  `code` varchar(25) NOT NULL COMMENT '申请单编码',
  `type` int(1) NOT NULL COMMENT '检验类型 0:原材料;1:产品;2:半成品;',
  `inspection_status` int(1) DEFAULT NULL COMMENT '检验状态:1:合格;0:不合格',
  `start_time` datetime NOT NULL COMMENT '检验开始日期',
  `end_time` datetime NOT NULL COMMENT '检验结束日期',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL COMMENT '登记日期',
  `update_time` datetime NOT NULL,
  `version` int(1) DEFAULT '1',
  `user_name` varchar(25) NOT NULL COMMENT '报检人',
  `inspect_user_id` int(10) DEFAULT NULL COMMENT '关联 æ£€éªŒäººï¼ˆç”¨æˆ·id)',
  `inspect_start_time` datetime DEFAULT NULL COMMENT '检验开始日期',
  `inspect_end_time` datetime DEFAULT NULL COMMENT '检验结束日期',
  `user_id` int(10) NOT NULL COMMENT '关联 ç™»è®°äººï¼ˆç”¨æˆ·id)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='申请表';
/*Data for the table `inspection` */
insert  into `inspection`(`id`,`type`,`inspection_status`,`qualified_state`,`state`,`create_time`,`update_time`,`version`,`user_name`,`inspect_user_id`,`inspect_start_time`,`inspect_end_time`) values
('1680929494813868034',0,0,NULL,1,'2023-07-17 21:16:36','2023-07-17 21:16:36',1,'测试人员',NULL,NULL,NULL),
('1680929899014750210',0,0,NULL,1,'2023-07-17 21:18:13','2023-07-17 21:18:13',1,'测试人员',NULL,NULL,NULL),
('1681215775833042945',0,0,NULL,1,'2023-07-18 16:14:11','2023-07-18 16:14:11',1,'测试人员',NULL,NULL,NULL);
/*Table structure for table `inspection_material_list` */
@@ -218,6 +214,7 @@
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `classify_id` int(10) NOT NULL COMMENT '分类ID å…³è”',
  `user_id` int(10) NOT NULL COMMENT '用户关联 ä¿ç®¡äºº',
  `create_user_id` int(10) NOT NULL COMMENT '创建人',
  `equipment_code` varchar(25) NOT NULL COMMENT '仪器设备编号',
  `equipment_name` varchar(25) NOT NULL COMMENT '仪器设备名称',
  `conditions` int(1) NOT NULL COMMENT '默认1;1:运行、2:故障、3:报修、4:检修、5:待机',
@@ -230,62 +227,150 @@
  `storage_place` varchar(100) DEFAULT '--' COMMENT '存放地',
  `whether_data_acquisition` int(1) NOT NULL COMMENT '是否支持数采',
  `equipment_measurement` int(1) NOT NULL COMMENT '是否需要仪器设备计量:如果需要计量周期必填;如果不需要计量周期不必填',
  `term_validity` int(11) NOT NULL COMMENT '计量截止有效期',
  `term_validity` int(11) DEFAULT NULL COMMENT '计量截止有效期',
  `descriptiveness` varchar(100) DEFAULT '--' COMMENT '描述',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  `version` int(1) DEFAULT '1' COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4;
/*Data for the table `instrument` */
insert  into `instrument`(`id`,`classify_id`,`user_id`,`equipment_code`,`equipment_name`,`conditions`,`specifications_models`,`measuring_range`,`error_rate`,`manufacturer`,`arrival_date`,`acceptance_date`,`storage_place`,`whether_data_acquisition`,`equipment_measurement`,`term_validity`,`descriptiveness`,`create_time`,`update_time`,`state`,`version`) values
(1,1,9,'JSTC-W1-00001','数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:15:23','2023-07-24 17:10:17',1,1),
(2,1,9,'JSTC-W1-00002','数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:17:56','2023-07-21 15:58:35',1,1),
(3,1,10,'JSTC-W1-00003','数字电桥',3,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2020-01-09 15:18:02','2023-07-21 15:18:02',1,1),
(4,1,11,'JSTC-W1-00004','数字电桥',2,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:18:10','2023-07-21 15:18:10',1,1),
(5,1,12,'JSTC-W1-00005','数字电桥',4,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:18:15','2023-07-21 15:18:15',1,1),
(6,1,13,'JSTC-W1-00006','A数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:18:19','2023-07-21 15:18:19',1,1),
(7,1,14,'JSTC-W1-00007','数字电桥',5,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:18:23','2023-07-21 15:18:23',1,1),
(8,1,9,'JSTC-W1-00008','数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-24 14:16:07','2023-07-24 14:16:07',1,1);
insert  into `instrument`(`id`,`classify_id`,`user_id`,`create_user_id`,`equipment_code`,`equipment_name`,`conditions`,`specifications_models`,`measuring_range`,`error_rate`,`manufacturer`,`arrival_date`,`acceptance_date`,`storage_place`,`whether_data_acquisition`,`equipment_measurement`,`term_validity`,`descriptiveness`,`create_time`,`update_time`,`state`,`version`) values
(1,13,9,9,'JSTC-W1-00001','数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:15:23','2023-07-28 11:37:02',0,1),
(2,1,9,9,'JSTC-W1-00002','数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:17:56','2023-07-21 15:58:35',1,1),
(3,1,10,9,'JSTC-W1-00003','数字电桥',3,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2020-01-09 15:18:02','2023-07-21 15:18:02',1,1),
(4,1,11,9,'JSTC-W1-00004','数字电桥',2,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:18:10','2023-07-21 15:18:10',1,1),
(5,1,12,11,'JSTC-W1-00005','数字电桥',4,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:18:15','2023-07-21 15:18:15',1,1),
(6,1,13,11,'JSTC-W1-00006','A数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:18:19','2023-07-21 15:18:19',1,1),
(7,1,14,11,'JSTC-W1-00007','数字电桥',5,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-21 15:18:23','2023-07-21 15:18:23',1,1),
(8,1,9,11,'JSTC-W1-00008','数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五!!!','2023-07-24 14:16:07','2023-07-24 14:16:07',1,1),
(9,3,7,11,'2','2',2,'2','2','2','2','2023-07-26 00:00:00','2023-07-26 00:00:00','2',1,1,2,'2','2023-07-26 11:26:53','2023-07-26 11:26:53',1,1),
(10,3,7,11,'3','2',2,'2','2','2','2','2023-07-26 00:00:00','2023-07-26 00:00:00','2',1,0,2,'2','2023-07-26 11:27:05','2023-07-26 11:27:05',1,1);
/*Table structure for table `link_basic_information` */
DROP TABLE IF EXISTS `link_basic_information`;
CREATE TABLE `link_basic_information` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `entrust_coding` varchar(25) NOT NULL COMMENT '委托编码',
  `entrusted` varchar(25) NOT NULL COMMENT '委托单位',
  `contacts` varchar(25) NOT NULL COMMENT '联系人',
  `contact_number` varchar(16) NOT NULL COMMENT '联系电话',
  `contact_address` varchar(50) NOT NULL COMMENT '联系地址',
  `completion_deadline` date NOT NULL COMMENT '完成期限',
  `inspection_time` date NOT NULL COMMENT '送样时间',
  `sample_delivery_mode` int(1) NOT NULL COMMENT '送样方式:1送样;2上门',
  `sample_sender` varchar(25) DEFAULT NULL COMMENT '送样人',
  `sample_delivery_phone` varchar(16) DEFAULT NULL COMMENT '送样人电话',
  `report_number` int(10) NOT NULL COMMENT '报告数',
  `entrust_remarks` varchar(100) DEFAULT NULL COMMENT '委托备注',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;
/*Data for the table `link_basic_information` */
insert  into `link_basic_information`(`id`,`entrust_coding`,`entrusted`,`contacts`,`contact_number`,`contact_address`,`completion_deadline`,`inspection_time`,`sample_delivery_mode`,`sample_sender`,`sample_delivery_phone`,`report_number`,`entrust_remarks`,`state`,`create_time`,`update_time`) values
(2,'SL20230803000003','阿里巴巴','小黑','12321423432','江苏南通','2023-08-03','2023-08-03',1,'小白','123456789676',23,'委托备注YPBH123456789YPBH123456789YPBH123456789',1,'2023-08-03 11:45:01','2023-08-03 11:45:01'),
(3,'SL20230803000003','阿里巴巴','小黑','12321423432','江苏南通','2023-08-03','2023-08-03',1,'小白','123456789676',23,'委托备注YPBH123456789YPBH123456789YPBH123456789',1,'2023-08-03 11:45:01','2023-08-03 11:45:01'),
(4,'SL20230803000003','阿里巴巴','小黑','12321423432','江苏南通','2023-08-03','2023-08-03',1,'小白','123456789676',23,'委托备注YPBH123456789YPBH123456789YPBH123456789',1,'2023-08-03 11:45:01','2023-08-03 11:45:01'),
(5,'SL20230803000003','阿里巴巴','小黑','12321423432','江苏南通','2023-08-03','2023-08-03',1,'小白','123456789676',23,'委托备注YPBH123456789YPBH123456789YPBH123456789',1,'2023-08-03 11:45:01','2023-08-03 11:45:01');
/*Table structure for table `link_detection` */
DROP TABLE IF EXISTS `link_detection`;
CREATE TABLE `link_detection` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sample_number` varchar(16) NOT NULL COMMENT '样品编号',
  `sample_name` varchar(25) NOT NULL COMMENT '样品名称',
  `specifications_models` varchar(25) NOT NULL COMMENT '规格型号',
  `unit` varchar(10) NOT NULL COMMENT '单位',
  `samples_number` int(10) NOT NULL COMMENT '样品数量',
  `experiment` varchar(50) NOT NULL COMMENT '试验',
  `remarks` varchar(100) NOT NULL COMMENT '备注',
  `link_basic_id` int(10) NOT NULL COMMENT 'link_basic_information å…³è”Id',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `date_survey` date DEFAULT NULL COMMENT '检验日期',
  `inspection_status` int(1) NOT NULL DEFAULT '2' COMMENT '检验状态 1:已检测 2:待检测',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;
/*Data for the table `link_detection` */
insert  into `link_detection`(`id`,`sample_number`,`sample_name`,`specifications_models`,`unit`,`samples_number`,`experiment`,`remarks`,`link_basic_id`,`state`,`create_time`,`update_time`,`date_survey`,`inspection_status`) values
(1,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',1),
(2,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',1),
(3,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',2),
(4,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',1),
(5,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',2),
(6,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',2),
(7,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',2),
(8,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',1),
(9,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',1),
(10,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',2),
(11,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',1),
(12,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',1),
(13,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',2),
(14,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',2),
(15,'YPBH123456789','发动机','GGXH-AAAAA','百度',0,'做梦','通过了',2,1,'2023-08-03 11:45:01','2023-08-03 11:45:01','2023-08-03',1);
/*Table structure for table `material` */
DROP TABLE IF EXISTS `material`;
CREATE TABLE `material` (
  `id` varchar(25) NOT NULL COMMENT '物料id',
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '物料id',
  `code` varchar(25) NOT NULL COMMENT '物料编码',
  `name` varchar(25) NOT NULL COMMENT '物料名称',
  `supplier` varchar(25) NOT NULL COMMENT '供应商',
  `location` varchar(25) NOT NULL COMMENT '物料存放地',
  `num` int(10) NOT NULL COMMENT '物料数量',
  `batch` varchar(25) NOT NULL COMMENT '批次',
  `reel_number` varchar(25) NOT NULL COMMENT '盘号',
  `type` int(1) NOT NULL COMMENT '0:原材料;1:成品;2:半成品',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `version` int(1) NOT NULL DEFAULT '1',
  `specifications_id` int(10) NOT NULL COMMENT '关联 è§„æ ¼id',
  `version` int(1) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
/*Data for the table `material` */
insert  into `material`(`id`,`name`,`supplier`,`location`,`num`,`batch`,`reel_number`,`state`,`create_time`,`update_time`,`version`,`specifications_id`) values
('11111111111111','22222222222','1111111111','1111111',1111111,'111111','1111111',0,'2023-07-20 15:19:11','2023-07-21 13:04:12',1,1),
('112233445566','手机','test','test',1,'2','3',1,'2023-07-21 13:29:57','2023-07-21 13:29:57',1,1),
('11223456','test','腾讯','仓库一,二号架',200,'2','152453211563232',1,'2023-07-21 13:51:21','2023-07-21 13:51:21',1,1),
('12345','testmaterial','test','test',1,'123','1',0,'2023-07-21 13:08:44','2023-07-21 13:13:54',1,1),
('123456','test','test','test',1,'1','1',0,'2023-07-21 13:14:49','2023-07-21 13:20:20',1,1),
('152423211563212','手机','百度','仓库一,二号架',200,'1','152453211563212',0,'2023-07-17 14:22:57','2023-07-21 13:28:54',1,1),
('152453211563211','石头','百度','仓库一,三号架',200,'1','152453211563212',0,'2023-07-17 14:14:03','2023-07-21 13:42:15',1,1),
('152453211563212','石头','百度','仓库一,二号架',200,'1','152453211563212',1,'2023-07-21 13:41:49','2023-07-21 13:41:49',1,1),
('152453211563222','石头','百度','仓库一,三号架',200,'1','152453211563212',1,'2023-07-17 14:14:03','2023-07-20 11:09:36',1,4),
('152453211563233','石头','百度','仓库一,三号架',200,'1','152453211563212',1,'2023-07-17 14:14:03','2023-07-20 11:00:29',1,4),
('218469124614','1122333','test','test',1,'1','1',1,'2023-07-21 13:31:00','2023-07-21 13:31:00',1,1),
('22222222','2222222','22222222','22222222',22222222,'2222222222','2222222',0,'2023-07-20 15:20:20','2023-07-21 13:21:25',1,1);
insert  into `material`(`id`,`code`,`name`,`type`,`state`,`create_time`,`update_time`,`version`) values
(1,'wl1','电线电缆',0,1,'2023-07-17 14:29:30','2023-07-31 09:58:05',1),
(2,'wl2','铝线',1,1,'2023-07-26 16:51:49','2023-07-26 16:51:50',1),
(3,'BZ1685832056873074690','石头',1,1,'2023-07-31 09:57:38','2023-07-31 09:57:38',1);
/*Table structure for table `metering_plan` */
DROP TABLE IF EXISTS `metering_plan`;
CREATE TABLE `metering_plan` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Id主键',
  `measure_person` int(10) NOT NULL COMMENT '计量负责人 å…³è”用户表',
  `create_Person` int(10) NOT NULL COMMENT '创建人 å…³è”用户表',
  `planned_order_number` varchar(25) NOT NULL COMMENT '计划单号',
  `begin_time` datetime NOT NULL COMMENT '开始时间',
  `end_time` datetime NOT NULL COMMENT '结束时间',
  `planning_status` int(1) NOT NULL COMMENT '计划状态:三种:1:已完成;2:待提交;3:未完成',
  `unit` varchar(10) NOT NULL COMMENT '计量单位',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  `version` int(1) DEFAULT '1' COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
/*Data for the table `metering_plan` */
insert  into `metering_plan`(`id`,`measure_person`,`create_Person`,`planned_order_number`,`begin_time`,`end_time`,`planning_status`,`unit`,`create_time`,`update_time`,`state`,`version`) values
(1,10,21,'P20230728000003','2023-07-06 00:00:00','2023-07-06 00:00:00',1,'GB','2023-07-28 10:07:53','2023-07-28 10:07:53',1,1),
(2,10,21,'P20230728000004','2023-07-06 00:00:00','2023-07-06 00:00:00',1,'GB','2023-07-28 10:27:30','2023-07-28 10:27:30',1,1);
/*Table structure for table `metrical_information` */
@@ -294,6 +379,7 @@
CREATE TABLE `metrical_information` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` int(10) NOT NULL COMMENT '用户关联Id',
  `instrument_id` int(10) NOT NULL COMMENT '仪器Id å…³è”',
  `measurement_unit` varchar(15) NOT NULL COMMENT '计量单位',
  `begin_date` datetime NOT NULL COMMENT '开始日期',
  `end_date` datetime NOT NULL COMMENT '结束日期',
@@ -307,13 +393,15 @@
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  `version` int(1) DEFAULT '1' COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
/*Data for the table `metrical_information` */
insert  into `metrical_information`(`id`,`user_id`,`measurement_unit`,`begin_date`,`end_date`,`uncertainty`,`result`,`performance_index`,`remarks`,`file_path`,`create_time`,`update_time`,`state`,`version`) values
(1,7,'1','2023-07-25 00:00:00','2023-07-25 00:00:00','1',1,'1','1','1690255123954_131493.png','2023-07-25 10:43:30','2023-07-25 13:50:24',1,1),
(2,7,'2','2023-07-25 00:00:00','2023-07-25 00:00:00','2',2,'2','2','1690264656523_540845.png','2023-07-25 11:18:44','2023-07-25 13:57:37',1,1);
insert  into `metrical_information`(`id`,`user_id`,`instrument_id`,`measurement_unit`,`begin_date`,`end_date`,`uncertainty`,`result`,`performance_index`,`remarks`,`file_path`,`create_time`,`update_time`,`state`,`version`) values
(1,7,1,'1','2023-07-25 00:00:00','2023-07-25 00:00:00','1',1,'1','1','1690255123954_131493.png','2023-07-25 10:43:30','2023-07-25 13:50:24',1,1),
(2,7,1,'2','2023-07-25 00:00:00','2023-07-25 00:00:00','2',2,'2','2','1690264656523_540845.png','2023-07-25 11:18:44','2023-07-25 13:57:37',1,1),
(3,7,2,'2','2023-07-25 00:00:00','2023-07-25 00:00:00','2',2,'2','2','1690264656523_540845.png','2023-07-25 11:18:44','2023-07-25 13:57:37',1,1),
(4,9,2,'1','2023-07-12 00:00:00','2023-08-23 00:00:00','1',2,'2','3','1690358892408_021031.gif','2023-07-26 16:08:12','2023-07-26 16:08:12',1,1);
/*Table structure for table `plan` */
@@ -340,40 +428,56 @@
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '测试标准id',
  `name` varchar(25) NOT NULL COMMENT '测试标准名称',
  `method` varchar(25) NOT NULL COMMENT '试验方法',
  `father` varchar(20) DEFAULT NULL COMMENT '测试标准父类',
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '项目id',
  `name` varchar(25) NOT NULL COMMENT '项目名称',
  `father` varchar(20) DEFAULT NULL COMMENT '项目父类',
  `unit` varchar(20) NOT NULL COMMENT '单位',
  `required` varchar(20) NOT NULL COMMENT '招标人要求值',
  `required` varchar(20) NOT NULL COMMENT '标准值',
  `internal` varchar(20) NOT NULL COMMENT '内控值',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `version` int(1) NOT NULL DEFAULT '1',
  `user_id` int(10) NOT NULL COMMENT '关联 ç”¨æˆ·id',
  `material_id` varchar(25) NOT NULL COMMENT '关联 ç‰©æ–™id',
  `specifications_id` int(10) NOT NULL COMMENT '关联 è§„æ ¼id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
/*Data for the table `product` */
insert  into `product`(`id`,`name`,`method`,`father`,`unit`,`required`,`internal`,`state`,`create_time`,`update_time`,`version`,`user_id`,`material_id`) values
(1,'单位长度质量','--','铝包钢芯铝绞线','km','<=0.3458','<=0.3458',0,'2023-07-17 14:56:22','2023-07-21 13:28:54',1,7,'152423211563212'),
(2,'单位宽度质量','--','铝包钢芯铝绞线','km','<=0.3458','<=0.3458',1,'2023-07-17 14:56:22','2023-07-20 11:09:36',1,7,'152453211563222'),
(3,'单位宽度质量','--',NULL,'km','<=0.3458','<=0.3458',1,'2023-07-17 14:56:22','2023-07-20 11:09:36',1,7,'152453211563222'),
(4,'好多1','控制变量法','1111111','好多1','2000','100',0,'2023-07-20 16:05:38','2023-07-21 13:04:12',1,7,'11111111111111'),
(5,'好多好多','---','新的父项目','好多好多','200','100',0,'2023-07-20 16:10:19','2023-07-21 13:04:12',1,7,'11111111111111'),
(6,'好多好多','---','新的父项目','好多好多','200','100',0,'2023-07-20 16:11:39','2023-07-21 13:04:12',1,7,'11111111111111'),
(7,'1111111','test',NULL,'test','12','123',1,'2023-07-21 13:31:34','2023-07-21 13:31:34',1,7,'112233445566'),
(8,'111111','1',NULL,'11','1','1',1,'2023-07-21 13:33:06','2023-07-21 13:33:06',1,7,'112233445566'),
(9,'单位长度质量','--','铝包钢芯铝绞线','km','<=0.3458','<=0.3458',1,'2023-07-21 13:39:28','2023-07-21 13:39:28',1,7,'152453211563212'),
(10,'单位长度质量','--','铝包钢芯铝绞线','km','<=0.3458','<=0.3458',0,'2023-07-21 13:42:01','2023-07-21 14:19:34',1,7,'152453211563212'),
(11,'1111111111','1111','铝包钢芯铝绞线','cm','11','111',0,'2023-07-21 13:48:25','2023-07-21 14:20:50',1,7,'152453211563212'),
(12,'11111111','1','铝包钢芯铝绞线','1111','1','1',0,'2023-07-21 13:48:59','2023-07-21 14:19:04',1,7,'112233445566'),
(13,'11111','--','11111111','km','<=0.3458','<=0.3458',1,'2023-07-21 13:52:21','2023-07-21 13:52:21',1,7,'11223456'),
(14,'12345','--','11111111','km','<=0.3458','<=0.3458',0,'2023-07-21 13:53:58','2023-07-21 13:56:17',1,7,'11223456'),
(15,'11111111111111','1','铝包钢芯铝绞线','111','11','1',0,'2023-07-21 14:23:10','2023-07-21 14:23:22',1,7,'152453211563212');
insert  into `product`(`id`,`name`,`father`,`unit`,`required`,`internal`,`state`,`create_time`,`update_time`,`version`,`specifications_id`) values
(1,'项目一','项目父类','ç±³','>=1','>1',1,'2023-07-17 15:03:17','2023-07-31 09:58:05',1,1),
(2,'项目二','父亲','人民币','>1','>2',1,'2023-07-17 21:17:54','2023-07-31 09:58:05',1,1),
(3,'项目三','父亲','人民币','>1','>2',1,'2023-07-17 21:17:54','2023-07-31 09:58:05',1,1);
/*Table structure for table `raw_material` */
DROP TABLE IF EXISTS `raw_material`;
CREATE TABLE `raw_material` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '原材料id',
  `supplier_name` varchar(25) NOT NULL COMMENT '供应商名称',
  `material_coding` varchar(25) NOT NULL COMMENT '材料编码',
  `material_name` varchar(25) NOT NULL COMMENT '材料名称',
  `specifications_models` varchar(25) NOT NULL COMMENT '规格型号',
  `unit` varchar(25) NOT NULL COMMENT '单位',
  `quantity` int(10) NOT NULL COMMENT '数量',
  `inspection_date` datetime NOT NULL COMMENT '报检日期',
  `surveyor` varchar(25) NOT NULL COMMENT '检验人',
  `date_survey` datetime NOT NULL COMMENT '检验日期',
  `condition` int(1) NOT NULL COMMENT '状态',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` date NOT NULL COMMENT '来料日期',
  `update_time` date NOT NULL,
  `version` int(1) DEFAULT '1' COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
/*Data for the table `raw_material` */
insert  into `raw_material`(`id`,`supplier_name`,`material_coding`,`material_name`,`specifications_models`,`unit`,`quantity`,`inspection_date`,`surveyor`,`date_survey`,`condition`,`state`,`create_time`,`update_time`,`version`) values
(1,'test','test','test','test','123',43,'2023-07-31 10:16:50','test','2023-07-31 10:16:54',1,1,'2023-07-31','2023-07-31',1),
(2,'test','test','test','test','123',43,'2023-07-31 10:16:50','test','2023-07-31 10:16:54',1,1,'2023-07-31','2023-07-31',1),
(3,'test','test','test','test','123',43,'2023-07-31 10:16:50','test','2023-07-31 10:16:54',1,1,'2023-07-31','2023-07-31',1);
/*Table structure for table `role` */
@@ -395,96 +499,54 @@
insert  into `role`(`id`,`name`,`power`,`state`,`create_time`,`update_time`,`version`) values 
(1,'普通人员',1,1,'2023-07-07 11:30:06','2023-07-07 11:30:11',1);
/*Table structure for table `serial_number` */
DROP TABLE IF EXISTS `serial_number`;
CREATE TABLE `serial_number` (
  `id` varchar(25) NOT NULL COMMENT '型号编号',
  `name` varchar(25) NOT NULL COMMENT '型号名称',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `version` int(1) NOT NULL DEFAULT '1',
  `standards_id` varchar(15) NOT NULL COMMENT '关联字段 æ ‡å‡†id',
  `user_id` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*Data for the table `serial_number` */
insert  into `serial_number`(`id`,`name`,`state`,`create_time`,`update_time`,`version`,`standards_id`,`user_id`) values
('111222','型号1',0,'2023-07-20 15:01:08','2023-07-20 15:20:09',1,'111',7),
('230711000002','光纤2.0.1',1,'2023-07-11 22:34:11','2023-07-20 09:28:19',1,'230711000001',7),
('ModelNumber001','光纤2.0.1',1,'2023-07-20 10:51:01','2023-07-20 10:51:01',1,'230711000002',7),
('ModelNumber002','光纤2.0.2',1,'2023-07-18 13:36:13','2023-07-20 09:28:19',1,'230711000001',7),
('ModelNumber003','光纤2.0.3',1,'2023-07-18 13:36:23','2023-07-20 10:54:11',1,'230711000002',7),
('num1','光纤2.0.3',1,'2023-07-20 14:18:24','2023-07-20 14:18:24',1,'230711000002',7),
('num2','光纤2.0.4',1,'2023-07-20 14:19:34','2023-07-20 14:19:34',1,'230711000002',7),
('PleasantGoat','1345',1,'2023-07-18 13:46:49','2023-07-20 10:22:42',1,'230711000002',7),
('spiritless','78915',1,'2023-07-18 13:46:24','2023-07-18 13:46:24',1,'230711000004',7);
/*Table structure for table `specifications` */
DROP TABLE IF EXISTS `specifications`;
CREATE TABLE `specifications` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '规格id',
  `number` varchar(25) NOT NULL COMMENT '规格编号',
  `name` varchar(25) NOT NULL COMMENT '产品规格',
  `instruct` varchar(25) DEFAULT NULL COMMENT '生产指令号',
  `voltage_level` varchar(30) DEFAULT NULL COMMENT '电压等级',
  `cross_section` varchar(30) DEFAULT NULL COMMENT '主线心截面',
  `number_of_cores` varchar(30) DEFAULT NULL COMMENT '主线芯芯数',
  `spe_state` int(1) NOT NULL DEFAULT '-1' COMMENT '规格状态 0:停用;1:正常;-1:草稿',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除 æ­£å¸¸>=1,删除<=0',
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '规格id',
  `name` varchar(25) NOT NULL COMMENT '规格名称',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `version` int(1) NOT NULL DEFAULT '1',
  `vel` varchar(15) NOT NULL DEFAULT 'V1.0' COMMENT '规格版本',
  `serial_id` varchar(25) NOT NULL COMMENT '关联字段 åž‹å·id',
  `user_id` int(10) NOT NULL COMMENT '关联字段 ç”¨æˆ·id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;
  `update_time` datetime NOT NULL,
  `version` int(1) DEFAULT '1',
  `standard_id` int(10) NOT NULL COMMENT '关联 æ ‡å‡†id',
  PRIMARY KEY (`id`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
/*Data for the table `specifications` */
insert  into `specifications`(`id`,`number`,`name`,`instruct`,`voltage_level`,`cross_section`,`number_of_cores`,`spe_state`,`state`,`create_time`,`update_time`,`version`,`vel`,`serial_id`,`user_id`) values
(1,'111','ab','test','1','test','test',0,1,'2023-07-12 00:00:12','2023-07-21 09:52:22',1,'V1.0','230711000002',7),
(2,'abc','AB','abc','abc','abc','abc',0,1,'2023-07-12 00:00:12','2023-07-20 16:34:38',1,'V1.0','230711000002',7),
(4,'abc','AB','abc','abc','abc','abc',1,1,'2023-07-12 00:00:12','2023-07-20 11:00:29',1,'V1.0','ModelNumber003',7),
(5,'abc','AB','abc','abc','abc','abc',1,1,'2023-07-12 00:00:12','2023-07-20 10:22:42',1,'V1.0','PleasantGoat',7),
(6,'modelId','AB','test','test','test','test',-1,1,'2023-07-20 13:42:40','2023-07-20 13:42:40',1,'V1.0','230711000002',7),
(7,'modelID1','test','test','test','test','test',-1,1,'2023-07-20 14:02:26','2023-07-20 14:02:26',1,'V1.0','230711000002',7),
(8,'modelId2','test11','test','test','test','test',-1,1,'2023-07-20 14:03:54','2023-07-20 14:03:54',1,'V1.0','230711000002',7),
(9,'111222','光纤2.0.3','test','test','test','test',-1,1,'2023-07-20 14:55:12','2023-07-20 14:55:12',1,'V1.0','230711000002',7);
insert  into `specifications`(`id`,`name`,`state`,`create_time`,`update_time`,`version`,`standard_id`) values
(1,'规格1',1,'2023-07-25 17:21:01','2023-07-31 10:08:16',1,1),
(2,'规格2',1,'2023-07-26 16:36:50','2023-07-31 09:58:05',1,1),
(3,'AB',1,'2023-07-31 09:57:38','2023-07-31 09:57:38',1,3),
(4,'AB',1,'2023-07-31 09:58:30','2023-07-31 09:58:30',1,4),
(5,'AB',1,'2023-07-31 09:58:58','2023-07-31 09:58:58',1,5),
(6,'AB',1,'2023-07-31 09:59:07','2023-07-31 09:59:07',1,1);
/*Table structure for table `standards` */
/*Table structure for table `standard` */
DROP TABLE IF EXISTS `standards`;
DROP TABLE IF EXISTS `standard`;
CREATE TABLE `standards` (
  `id` varchar(15) NOT NULL COMMENT '标准编号 yyMMdd000001(000001++)',
CREATE TABLE `standard` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(25) NOT NULL COMMENT '标准名称',
  `eng_name` varchar(25) NOT NULL COMMENT '英文名称',
  `type` int(1) NOT NULL COMMENT '0:原材料;1:电线电缆',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑字段 0:删除;1:正常',
  `create_time` datetime NOT NULL COMMENT '生效日期',
  `update_time` datetime NOT NULL COMMENT '更新日期',
  `version` int(1) NOT NULL DEFAULT '1',
  `user_id` int(10) NOT NULL COMMENT '关联字段 æ›´æ–°äººid',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `version` int(1) DEFAULT '1',
  `material_id` int(10) NOT NULL COMMENT '关联 ç‰©æ–™id',
  PRIMARY KEY (`id`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;
/*Data for the table `standards` */
/*Data for the table `standard` */
insert  into `standards`(`id`,`name`,`eng_name`,`type`,`state`,`create_time`,`update_time`,`version`,`user_id`) values
('111','123131313','164654565',0,0,'2023-07-20 13:26:55','2023-07-20 15:20:09',1,7),
('112233445566','鱼鱼','fish',1,0,'2023-07-20 10:54:12','2023-07-20 15:19:41',1,7),
('230711000001','小白','OpticalFibre',1,1,'2023-07-11 21:27:04','2023-07-20 09:28:19',1,6),
('230711000002','材料','OpticalFibrw',1,1,'2023-07-11 21:27:04','2023-07-20 10:22:42',1,6),
('230711000003','显示屏','Monitor',2,1,'2023-07-18 13:43:52','2023-07-18 13:43:52',1,7),
('230711000004','小黑','Black',2,1,'2023-07-18 13:44:29','2023-07-18 13:44:29',1,7);
insert  into `standard`(`id`,`name`,`state`,`create_time`,`update_time`,`version`,`material_id`) values
(1,'标准1',1,'2023-07-25 17:08:58','2023-07-31 09:58:05',1,1),
(2,'标准2',1,'2023-07-26 22:15:55','2023-07-31 09:58:05',1,1),
(3,'光纤',1,'2023-07-31 09:57:38','2023-07-31 09:57:38',1,3),
(4,'光纤',1,'2023-07-31 09:58:30','2023-07-31 09:58:30',1,1),
(5,'光纤',1,'2023-07-31 09:58:58','2023-07-31 09:58:58',1,1);
/*Table structure for table `user` */
sys/src/test/java/com/yuanchu/limslaboratory/SysApplicationTests.java
@@ -1,9 +1,18 @@
package com.yuanchu.limslaboratory;
import com.yuanchu.limslaboratory.pojo.vo.PlanVo;
import com.yuanchu.limslaboratory.service.PlanService;
import com.yuanchu.limslaboratory.utils.MyUtil;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import javax.annotation.Resource;
import java.util.List;
@SpringBootTest
class SysApplicationTests {
    @Resource
    private PlanService planService;
    @Test
    void contextLoads() {
@@ -11,6 +20,11 @@
        System.out.println("newString === " + newString);
    }
    @Test
    void TT() {
        List<PlanVo> planVos = planService.selectAllPlan(null, null, null, null);
        planVos.forEach(System.out::println);
    }
}