¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.ReportCheckVo; |
| | | import com.yuanchu.limslaboratory.service.ReportCheckService; |
| | | 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 java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2023-08-07 |
| | | */ |
| | | @Api(tags = "æ£éªæ¨¡å-->æ¥åå®¡æ ¸") |
| | | @RestController |
| | | @RequestMapping("/reportCheck") |
| | | public class ReportCheckController { |
| | | /** |
| | | * æå¡å¯¹è±¡ |
| | | */ |
| | | @Autowired |
| | | private ReportCheckService reportCheckService; |
| | | |
| | | @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("/selectAllReportCheck") |
| | | public Result selectAllReportCheck(Integer page, Integer pageSize, Integer status, String name) { |
| | | IPage<ReportCheckVo> reportPage = reportCheckService.selectAllReportCheck(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); |
| | | } |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2023-08-07 |
| | | */ |
| | | @Api(tags = "æ£éªæ¨¡å-->æ£éªæ¥å") |
| | | @RestController |
| | | @RequestMapping("/report") |
| | | public class ReportController { |
| | | /** |
| | | * æå¡å¯¹è±¡ |
| | | */ |
| | | @Autowired |
| | | 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); |
| | | } |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.ReportCheckVo; |
| | | 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<ReportCheckVo> selectAllReportCheck(Page<Object> page, Integer status, String name); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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="InspectionReport对象", description="") |
| | | @TableName("inspection_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 = "å®¡æ ¸äººid") |
| | | private Integer userId; |
| | | |
| | | @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; |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 ReportCheckVo { |
| | | @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 HH:mm:ss", timezone = "GMT+8") |
| | | private Date submitTime; |
| | | @ApiModelProperty(value = "å®¡æ ¸æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date checkTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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ï¼å¾
ç¾åï¼3ï¼å·²å®æ") |
| | | @JsonSerialize |
| | | private Integer status; |
| | | @ApiModelProperty(value = "æ£éªç»è®º") |
| | | @JsonSerialize |
| | | private String conclusion; |
| | | @ApiModelProperty(value = "ç¼å¶äºº") |
| | | @JsonSerialize |
| | | private Integer userId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.ReportCheckVo; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2023-08-07 |
| | | */ |
| | | public interface ReportCheckService extends IService<Report> { |
| | | |
| | | /** |
| | | * 项ç®å®¡æ ¸è¡¨æ¥è¯¢ |
| | | * @return |
| | | */ |
| | | IPage<ReportCheckVo> selectAllReportCheck(Page<Object> page, Integer status, String name); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.ReportCheckVo; |
| | | import com.yuanchu.limslaboratory.service.ReportCheckService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2023-08-07 |
| | | */ |
| | | @Service |
| | | public class ReportCheckServiceImpl extends ServiceImpl<ReportMapper, Report> implements ReportCheckService { |
| | | |
| | | @Autowired |
| | | private ReportMapper inspectionReportMapper; |
| | | |
| | | |
| | | /** |
| | | * 项ç®å®¡æ ¸è¡¨æ¥è¯¢ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<ReportCheckVo> selectAllReportCheck(Page<Object> page, Integer status, String name) { |
| | | return inspectionReportMapper.selectAllReportCheck(page, status, name); |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2023-08-07 |
| | | */ |
| | | @Service |
| | | public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> implements ReportService { |
| | | |
| | | @Autowired |
| | | private ReportMapper reportMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªæ¥å |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<ReportVo> selectAllReport(Page<Object> page, Integer status, String name) { |
| | | return reportMapper.selectAllReport(page, status, name); |
| | | } |
| | | |
| | | } |
| | | |