¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | import com.yuanchu.limslaboratory.pojo.Dto.CnasSatisfactionSurveyDto; |
| | | import com.yuanchu.limslaboratory.pojo.vo.CnasSatisfactionSurveyVo; |
| | | import com.yuanchu.limslaboratory.service.CnasSatisfactionSurveyService; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | 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; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/10 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/cnasSatisfactionSurvey") |
| | | @Api(tags = "CNAS-->满æåº¦è°æ¥") |
| | | public class CnasSatisfactionSurveyController { |
| | | |
| | | @Resource |
| | | private CnasSatisfactionSurveyService service; |
| | | |
| | | /** |
| | | * è·å满æåº¦è°æ¥ä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è·å满æåº¦è°æ¥") |
| | | @GetMapping("/getCnasSatisfactionSurvey") |
| | | public Result<CnasSatisfactionSurveyVo>getCnasSatisfactionSurvey(CnasSatisfactionSurveyDto cnasSatisfactionSurveyDto){ |
| | | return Result.success(service.getCnasSatisfactionSurvey(cnasSatisfactionSurveyDto)); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.CnasSatisfactionSurvey; |
| | | import com.yuanchu.limslaboratory.pojo.Dto.CnasSatisfactionSurveyDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/10 |
| | | */ |
| | | @Repository |
| | | public interface CnasSatisfactionSurveyMapper extends BaseMapper<CnasSatisfactionSurvey> { |
| | | |
| | | IPage<CnasSatisfactionSurvey>selectCnasSatisfactionSurvey(Page<CnasSatisfactionSurvey>page, @Param("dto") CnasSatisfactionSurveyDto dto); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Date; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/10 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_satisfaction_survey") |
| | | public class CnasSatisfactionSurvey implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 项ç®åç§° |
| | | */ |
| | | private String projectName; |
| | | |
| | | /** |
| | | * è°æ¥æ¥æ |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date surveyDate; |
| | | |
| | | /** |
| | | * 客æ·åä½åç§° |
| | | */ |
| | | private String userUnit; |
| | | |
| | | /** |
| | | * æ¥æ |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date dateInfo; |
| | | |
| | | /** |
| | | * å¡«å人å§å |
| | | */ |
| | | private String fillName; |
| | | |
| | | /** |
| | | * èä½ |
| | | */ |
| | | private String post; |
| | | |
| | | /** |
| | | * èç³»çµè¯ |
| | | */ |
| | | private String telephone; |
| | | |
| | | /** |
| | | * å½å
¥æ¥æ |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date entryDate; |
| | | |
| | | /** |
| | | * å½å
¥äººid |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * å½å
¥äººåç§° |
| | | */ |
| | | private String userName; |
| | | |
| | | /** |
| | | * éä»¶å°å |
| | | */ |
| | | private String fileUrl; |
| | | |
| | | /** |
| | | * æå¡æåº¦ |
| | | */ |
| | | private String serviceAttitude; |
| | | |
| | | /** |
| | | * ææ¯è½å |
| | | */ |
| | | private String technicalPower; |
| | | |
| | | /** |
| | | * æ£æµå·¥ä½ |
| | | */ |
| | | private String testJob; |
| | | |
| | | /** |
| | | * æ¹è¿è¦æ± |
| | | */ |
| | | private String improvementRequirements; |
| | | |
| | | /** |
| | | * å
¶ä»è¡¥å
|
| | | */ |
| | | private String otherSupplements; |
| | | |
| | | @TableLogic(value = "1") |
| | | private Integer state; |
| | | |
| | | |
| | | @DateTimeFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss" |
| | | ) |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss" |
| | | ) |
| | | private LocalDateTime createdTime; |
| | | |
| | | |
| | | @DateTimeFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss" |
| | | ) |
| | | @JsonFormat( |
| | | pattern = "yyyy-MM-dd HH:mm:ss" |
| | | ) |
| | | private LocalDateTime updatedTime; |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.pojo.Dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/10 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="CnasSatisfactionSurveyDto", description="") |
| | | public class CnasSatisfactionSurveyDto implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "å½å页", example = "1", required = true) |
| | | private Long currentPage; |
| | | |
| | | @ApiModelProperty(value = "å页å¤å°æ¡", example = "10", required = true) |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "è°æ¥æ¥æ", example = "2020-01-02", required = true) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date surveyDate; |
| | | |
| | | @ApiModelProperty(value = "å½å
¥æ¥æ", example = "2025-06-08", required = true) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date entryDate; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.pojo.vo; |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.yuanchu.limslaboratory.pojo.CnasSatisfactionSurvey; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/10 |
| | | */ |
| | | @Data |
| | | public class CnasSatisfactionSurveyVo implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @JsonSerialize |
| | | private List<CnasSatisfactionSurvey> cnasSatisfactionSurveyList; |
| | | |
| | | @JsonSerialize |
| | | private Long total; |
| | | |
| | | public CnasSatisfactionSurveyVo(List<CnasSatisfactionSurvey> cnasSatisfactionSurveyList, Long total) { |
| | | this.cnasSatisfactionSurveyList = cnasSatisfactionSurveyList; |
| | | this.total = total; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.service; |
| | | |
| | | import com.yuanchu.limslaboratory.pojo.Dto.CnasSatisfactionSurveyDto; |
| | | import com.yuanchu.limslaboratory.pojo.vo.CnasSatisfactionSurveyVo; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/10 |
| | | */ |
| | | public interface CnasSatisfactionSurveyService{ |
| | | |
| | | /** |
| | | * è·å满æåº¦è°æ¥ä¿¡æ¯ |
| | | * @param cnasSatisfactionSurveyDto |
| | | * @return |
| | | */ |
| | | CnasSatisfactionSurveyVo getCnasSatisfactionSurvey(CnasSatisfactionSurveyDto cnasSatisfactionSurveyDto); |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.mapper.CnasSatisfactionSurveyMapper; |
| | | import com.yuanchu.limslaboratory.pojo.CnasSatisfactionSurvey; |
| | | import com.yuanchu.limslaboratory.pojo.Dto.CnasSatisfactionSurveyDto; |
| | | import com.yuanchu.limslaboratory.pojo.vo.CnasSatisfactionSurveyVo; |
| | | import com.yuanchu.limslaboratory.service.CnasSatisfactionSurveyService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @Author å¼ å®¾ |
| | | * @Date 2023/8/10 |
| | | */ |
| | | @Service |
| | | public class CnasSatisfactionSurveyServiceImpl implements CnasSatisfactionSurveyService { |
| | | |
| | | |
| | | @Resource |
| | | private CnasSatisfactionSurveyMapper mapper; |
| | | |
| | | @Override |
| | | public CnasSatisfactionSurveyVo getCnasSatisfactionSurvey(CnasSatisfactionSurveyDto cnasSatisfactionSurveyDto) { |
| | | Page<CnasSatisfactionSurvey>page=new Page<>(cnasSatisfactionSurveyDto.getCurrentPage(), cnasSatisfactionSurveyDto.getPageNum(),true); |
| | | IPage<CnasSatisfactionSurvey> cnasSatisfactionSurveyIPage = mapper.selectCnasSatisfactionSurvey(page, cnasSatisfactionSurveyDto); |
| | | return new CnasSatisfactionSurveyVo(cnasSatisfactionSurveyIPage.getRecords(),cnasSatisfactionSurveyIPage.getTotal()); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.CnasSatisfactionSurveyMapper"> |
| | | |
| | | <select id="selectCnasSatisfactionSurvey" |
| | | resultType="CnasSatisfactionSurvey"> |
| | | SELECT |
| | | css.id id, |
| | | css.project_name projectName, |
| | | css.survey_date surveyDate, |
| | | css.user_unit userUnit, |
| | | css.date_info dateInfo, |
| | | css.`fill_name` fillName, |
| | | css.post post, |
| | | css.telephone telephone, |
| | | css.entry_date entryDate, |
| | | u.`name` userName, |
| | | css.service_attitude serviceAttitude, |
| | | css.technical_power technicalPower, |
| | | css.test_job testJob, |
| | | css.improvement_requirements improvementRequirements |
| | | FROM |
| | | cnas_satisfaction_survey css, |
| | | `user` u |
| | | WHERE |
| | | 1 = 1 |
| | | AND css.user_id = u.id |
| | | and css.state=1 |
| | | <if test="dto.surveyDate!=null"> |
| | | and css.survey_date = ${dto.surveyDate} |
| | | </if> |
| | | <if test="dto.entryDate!=null"> |
| | | and css.entry_date = ${dto.entryDate} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | <name>framework</name> |
| | | <description>framework</description> |
| | | |
| | | <packaging>jar</packaging> |
| | | <dependencies> |
| | | <!--æ°æ®åºè¿æ¥æ± --> |
| | |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.8.18</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(type =IdType.ASSIGN_ID) |
| | | private Long id; |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private Long id; |
| | | |
| | | /** |
| | | * æ ·åç¼å· |