From 4b1a7e68b61e20fc8e7483b385905ca04a7b6c42 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 20 Mar 2024 11:10:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AE=AE=E8=AE=B0=E5=BD=95=E8=A1=A8+?= =?UTF-8?q?=E6=BC=94=E7=BB=83=E8=AE=B0=E5=BD=95=E8=A1=A8+=E5=9F=B9?= =?UTF-8?q?=E8=AE=AD=E8=AE=B0=E5=BD=95+=E8=80=83=E8=AF=95=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=EF=BC=8C=E5=BC=80=E5=A7=8B=E5=92=8C=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BD=AC=E6=8D=A2=E6=88=90=EF=BC=9Ayyyy-MM-d?= =?UTF-8?q?d=20HH:mm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../safeproduct/entity/CarMaintenanceEntity.java | 8 +- .../safeproduct/entity/ConferenceRecordEntity.java | 14 ++ .../safeproduct/entity/RehearsalRecordEntity.java | 15 ++ .../safeproduct/entity/TrainRecordEntity.java | 14 ++ .../safeproduct/vo/CarMaintenanceDetailVO.java | 6 +- .../safeproduct/vo/ConferenceRecordDetailVO.java | 4 +- .../safeproduct/vo/RehearsalRecordDetailVO.java | 4 +- .../hnac/hzims/safeproduct/vo/TestScoreSumVO.java | 24 +++ .../com/hnac/hzims/safeproduct/vo/TestScoreVO.java | 6 + .../hzims/safeproduct/vo/TrainRecordDetailVO.java | 4 +- .../safeproduct/controller/TrainController.java | 13 +- .../safeproduct/mapper/CarMaintenanceMapper.xml | 4 +- .../safeproduct/service/ITestScoreService.java | 3 + .../service/impl/CarMaintenanceServiceImpl.java | 2 +- .../service/impl/ConferenceRecordServiceImpl.java | 12 ++ .../service/impl/RehearsalRecordServiceImpl.java | 8 + .../service/impl/TestScoreServiceImpl.java | 33 +++- .../service/impl/TrainRecordServiceImpl.java | 7 + .../hnac/hzims/safeproduct/utils/TimeUtils.java | 195 +++++++++++++++++++++ .../safeproduct/src/main/resources/db/2.0.0.sql.1 | 1 - .../resources/template/车辆维保记录单.docx | Bin 12112 -> 11958 bytes 21 files changed, 353 insertions(+), 24 deletions(-) create mode 100644 hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TestScoreSumVO.java create mode 100644 hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/TimeUtils.java diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarMaintenanceEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarMaintenanceEntity.java index 10da28b..172f7b5 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarMaintenanceEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarMaintenanceEntity.java @@ -43,10 +43,10 @@ public class CarMaintenanceEntity extends BaseEntity { @ApiModelProperty("维保开始时间") private Date startTime; - @NotNull - @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty("维保结束时间") - private Date endTime; +// @NotNull +// @JsonFormat(pattern = "yyyy-MM-dd") +// @ApiModelProperty("维保结束时间") +// private Date endTime; @NotNull @Size(max = 255, message = "维保地点长度不能超过255") diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferenceRecordEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferenceRecordEntity.java index 99e3341..5ad107a 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferenceRecordEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferenceRecordEntity.java @@ -1,11 +1,13 @@ package com.hnac.hzims.safeproduct.entity; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.Size; import java.util.Date; @@ -32,9 +34,21 @@ public class ConferenceRecordEntity extends BaseEntity { private String peopleName; @ApiModelProperty("会议实际开始时间") + @DateTimeFormat( + pattern = "yyyy-MM-dd HH:mm" + ) + @JsonFormat( + pattern = "yyyy-MM-dd HH:mm" + ) private Date actualStartTime; @ApiModelProperty("会议实际结束时间") + @DateTimeFormat( + pattern = "yyyy-MM-dd HH:mm" + ) + @JsonFormat( + pattern = "yyyy-MM-dd HH:mm" + ) private Date actualEndTime; @Size(max = 20, message = "记录人字段长度不能超过20") diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/RehearsalRecordEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/RehearsalRecordEntity.java index 1b139d9..f9a8af9 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/RehearsalRecordEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/RehearsalRecordEntity.java @@ -1,16 +1,19 @@ package com.hnac.hzims.safeproduct.entity; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; +import java.time.LocalDate; import java.util.Date; /** @@ -41,10 +44,22 @@ public class RehearsalRecordEntity extends BaseEntity { @NotNull @ApiModelProperty("演练实际开始时间") + @DateTimeFormat( + pattern = "yyyy-MM-dd HH:mm" + ) + @JsonFormat( + pattern = "yyyy-MM-dd HH:mm" + ) private Date actualStartTime; @NotNull @ApiModelProperty("演练实际结束时间") + @DateTimeFormat( + pattern = "yyyy-MM-dd HH:mm" + ) + @JsonFormat( + pattern = "yyyy-MM-dd HH:mm" + ) private Date actualEndTime; @NotNull diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TrainRecordEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TrainRecordEntity.java index ad42f8a..33cb4f0 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TrainRecordEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TrainRecordEntity.java @@ -1,11 +1,13 @@ package com.hnac.hzims.safeproduct.entity; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.Size; import java.util.Date; @@ -39,9 +41,21 @@ public class TrainRecordEntity extends BaseEntity { private String content; @ApiModelProperty("实际培训开始时间") + @DateTimeFormat( + pattern = "yyyy-MM-dd HH:mm" + ) + @JsonFormat( + pattern = "yyyy-MM-dd HH:mm" + ) private Date actualStartTime; @ApiModelProperty("实际培训结束时间") + @DateTimeFormat( + pattern = "yyyy-MM-dd HH:mm" + ) + @JsonFormat( + pattern = "yyyy-MM-dd HH:mm" + ) private Date actualEndTime; @Size(max = 250, message = "培训评价字段长度不能超过250") diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/CarMaintenanceDetailVO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/CarMaintenanceDetailVO.java index 2fe4817..554bd7b 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/CarMaintenanceDetailVO.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/CarMaintenanceDetailVO.java @@ -21,9 +21,9 @@ public class CarMaintenanceDetailVO { @ApiModelProperty("维保开始时间") private Date startTime; - - @ApiModelProperty("维保结束时间") - private Date endTime; +// 和需求方确定暂时不用了 +// @ApiModelProperty("维保结束时间") +// private Date endTime; @ApiModelProperty("维保地点") private String location; diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java index c876c9a..6bfaadb 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java @@ -20,10 +20,10 @@ public class ConferenceRecordDetailVO { private String code; @ApiModelProperty("会议实际开始时间") - private Date actualStartTime; + private String actualStartTime; @ApiModelProperty("会议实际结束时间") - private Date actualEndTime; + private String actualEndTime; @ApiModelProperty("单位") private String unit; diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailVO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailVO.java index 9b57e9c..e1d414f 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailVO.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailVO.java @@ -23,10 +23,10 @@ public class RehearsalRecordDetailVO { private String peopleName; @ApiModelProperty("演练实际开始时间") - private Date actualStartTime; + private String actualStartTime; @ApiModelProperty("演练实际结束时间") - private Date actualEndTime; + private String actualEndTime; @ApiModelProperty("演练记录") private String record; diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TestScoreSumVO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TestScoreSumVO.java new file mode 100644 index 0000000..518ebb5 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TestScoreSumVO.java @@ -0,0 +1,24 @@ +package com.hnac.hzims.safeproduct.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author liwen + * @date 2023-12-25 + */ +@Data +@ApiModel(value = "考试成绩VO类") +public class TestScoreSumVO { + + @ApiModelProperty("应考人数") + private Integer peopleNum=0; + + @ApiModelProperty("实考人数") + private Integer actualPeopleNum=0; + + @ApiModelProperty("及格率") + private Double percentage=0.0; + +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TestScoreVO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TestScoreVO.java index 019d7b0..7de3c9a 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TestScoreVO.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TestScoreVO.java @@ -15,6 +15,12 @@ public class TestScoreVO { @ApiModelProperty("考试成绩id") private Long id; + @ApiModelProperty("单位") + private Long dept; + + @ApiModelProperty("单位名") + private String deptName; + @ApiModelProperty("姓名") private String name; diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TrainRecordDetailVO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TrainRecordDetailVO.java index e7a6dff..e8850de 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TrainRecordDetailVO.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TrainRecordDetailVO.java @@ -20,10 +20,10 @@ public class TrainRecordDetailVO { private String code; @ApiModelProperty("实际培训开始时间") - private Date actualStartTime; + private String actualStartTime; @ApiModelProperty("实际培训结束时间") - private Date actualEndTime; + private String actualEndTime; @ApiModelProperty("单位") private String unit; diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java index f65f90d..e5cef0f 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java @@ -12,10 +12,7 @@ import com.hnac.hzims.safeproduct.service.ITestScoreService; import com.hnac.hzims.safeproduct.service.ITestService; import com.hnac.hzims.safeproduct.service.ITrainPlanService; import com.hnac.hzims.safeproduct.service.ITrainRecordService; -import com.hnac.hzims.safeproduct.vo.TestScoreVO; -import com.hnac.hzims.safeproduct.vo.TrainMonthVO; -import com.hnac.hzims.safeproduct.vo.TrainRecordDetailVO; -import com.hnac.hzims.safeproduct.vo.TrainYearVO; +import com.hnac.hzims.safeproduct.vo.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -199,7 +196,13 @@ public class TrainController extends BladeController { List list = testScoreService.testScoreList(testId, name); return R.data(list); } - + @GetMapping("/testScoreSum") + @ApiOperation(value = "考试总计") + @ApiOperationSupport(order = 18) + public R testScoreSum(@RequestParam Long testId, String name) { + TestScoreSumVO list = testScoreService.testScoreSum(testId, name); + return R.data(list); + } @PostMapping("/updateBatchScore") @ApiOperation(value = "批量填写分数") @ApiOperationSupport(order = 19) diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml index 122440d..47ef050 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml @@ -4,7 +4,7 @@