From 3c396bb0b7f5e4c88f1d8e86713b0cd5f8e769b0 Mon Sep 17 00:00:00 2001 From: liwen Date: Tue, 16 Jan 2024 10:17:00 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=9F=B9=E8=AE=AD=E3=80=81=E4=BC=9A?= =?UTF-8?q?=E8=AE=AE=E3=80=81=E5=8D=AB=E7=94=9F=E8=87=AA=E6=9F=A5=E3=80=81?= =?UTF-8?q?=E8=BD=A6=E8=BE=86=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/safeproduct/dto/ConferenceExportDTO.java | 2 +- .../safeproduct/entity/CarUsedRecordEntity.java | 2 +- .../hzims/safeproduct/entity/HygienePlanEntity.java | 3 +++ .../safeproduct/controller/TrainController.java | 4 ++-- .../safeproduct/mapper/ConferenceRecordMapper.xml | 6 +++--- .../hzims/safeproduct/mapper/TestScoreMapper.java | 3 ++- .../hzims/safeproduct/mapper/TestScoreMapper.xml | 3 +++ .../hzims/safeproduct/service/ITestScoreService.java | 3 ++- .../service/impl/CarCheckRecordServiceImpl.java | 6 +++--- .../service/impl/CarUsedRecordServiceImpl.java | 12 ++++++------ .../service/impl/TestScoreServiceImpl.java | 4 ++-- .../com/hnac/hzims/safeproduct/utils/BaseUtil.java | 1 + .../safeproduct/src/main/resources/db/1.0.2.sql | 20 +++++++++++++------- 13 files changed, 42 insertions(+), 27 deletions(-) diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/ConferenceExportDTO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/ConferenceExportDTO.java index 6107a4d..e72d988 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/ConferenceExportDTO.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/ConferenceExportDTO.java @@ -46,6 +46,6 @@ public class ConferenceExportDTO { private String host; @ApiModelProperty("会议状态") - @ExcelProperty(value = "会议状态", index = 9) + @ExcelProperty(value = "会议状态", index = 7) private String conferenceStatus; } diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarUsedRecordEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarUsedRecordEntity.java index 941a57a..cacbf83 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarUsedRecordEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarUsedRecordEntity.java @@ -55,10 +55,10 @@ public class CarUsedRecordEntity extends BaseEntity { @ApiModelProperty("出车公里数") private BigDecimal startMiles; + @NotNull @ApiModelProperty("收车公里数") private BigDecimal endMiles; - @NotNull @ApiModelProperty("行驶公里数") private BigDecimal miles; diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java index 39a641f..f93c6c8 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java @@ -9,6 +9,7 @@ import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; import java.util.Date; /** @@ -21,9 +22,11 @@ import java.util.Date; @ApiModel(value = "卫生自查计划实体类") public class HygienePlanEntity extends BaseEntity { + @Size(max = 50, message = "计划名称字段长度不能超过50") @ApiModelProperty("计划名称") private String name; + @Size(max = 50, message = "单位字段长度不能超过50") @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 0cd49d3..28b8043 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 @@ -194,8 +194,8 @@ public class TrainController extends BladeController { @GetMapping("/testScoreList") @ApiOperation(value = "考试成绩列表") @ApiOperationSupport(order = 18) - public R> testScoreList(@RequestParam Long testId) { - List list = testScoreService.testScoreList(testId); + public R> testScoreList(@RequestParam Long testId, String name) { + List list = testScoreService.testScoreList(testId, name); return R.data(list); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml index 1de030a..a2cc05e 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml @@ -4,13 +4,13 @@ \ No newline at end of file diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.java index 8497c60..23290b8 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.java @@ -19,7 +19,8 @@ public interface TestScoreMapper extends BaseMapper { /** * 查询考试成绩列表 * @param testId 考试记录id + * @param name 姓名 * @return 考试成绩列表 */ - List testScoreList(Long testId); + List testScoreList(Long testId, String name); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.xml index cf6795a..fcd0903 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.xml @@ -12,6 +12,9 @@ AND test_id = #{testId} + + AND name like concat('%', #{name}, '%'} + ORDER BY score DESC diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITestScoreService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITestScoreService.java index 802e6ea..85d8e4e 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITestScoreService.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITestScoreService.java @@ -18,9 +18,10 @@ public interface ITestScoreService extends IService { /** * 查询考试成绩列表 * @param testId 考试记录id + * @param name 姓名 * @return 考试成绩列表 */ - List testScoreList(Long testId); + List testScoreList(Long testId, String name); /** * 批量填写分数 diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarCheckRecordServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarCheckRecordServiceImpl.java index 1b55389..ad33674 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarCheckRecordServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarCheckRecordServiceImpl.java @@ -191,9 +191,9 @@ public class CarCheckRecordServiceImpl extends ServiceImpl params = BaseUtil.obj2Map(carCheckRecordDetailVO); - String templateFile = "template/车检记录单" + SafeProductConstant.DOCX_SUFFIX; - String wordPath = savePath + "/车检记录单" + SafeProductConstant.DOCX_SUFFIX; - String pdfPath = savePath + "/车检记录单" + SafeProductConstant.PDF_SUFFIX; + String templateFile = "template/车辆检查表" + SafeProductConstant.DOCX_SUFFIX; + String wordPath = savePath + "/车辆检查表" + SafeProductConstant.DOCX_SUFFIX; + String pdfPath = savePath + "/车辆检查表" + SafeProductConstant.PDF_SUFFIX; BaseUtil.exportDocument(templateFile, params, wordPath, pdfPath, response); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarUsedRecordServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarUsedRecordServiceImpl.java index 90f9977..0fbfb74 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarUsedRecordServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarUsedRecordServiceImpl.java @@ -54,9 +54,9 @@ public class CarUsedRecordServiceImpl extends ServiceImpl testScoreList(Long testId) { - return baseMapper.testScoreList(testId); + public List testScoreList(Long testId, String name) { + return baseMapper.testScoreList(testId, name); } /** diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/BaseUtil.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/BaseUtil.java index ab862ed..1cc74f1 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/BaseUtil.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/BaseUtil.java @@ -111,6 +111,7 @@ public class BaseUtil { xwpfDocument = WordExportUtil.exportWord07(templatePath, params); } catch (Exception e) { log.error("数据写入异常: {}", e.getMessage()); + e.printStackTrace(); } return xwpfDocument; } diff --git a/hzims-service/safeproduct/src/main/resources/db/1.0.2.sql b/hzims-service/safeproduct/src/main/resources/db/1.0.2.sql index 9f2813e..1c13094 100644 --- a/hzims-service/safeproduct/src/main/resources/db/1.0.2.sql +++ b/hzims-service/safeproduct/src/main/resources/db/1.0.2.sql @@ -69,7 +69,7 @@ CREATE TABLE `hzims_train_record` ( `train_record_name` varchar(50) NOT NULL DEFAULT '' COMMENT '培训记录名称', `code` varchar(50) NOT NULL COMMENT '编号', `people_name` varchar(5000) DEFAULT '' COMMENT '培训学员', - `content` mediumtext DEFAULT '' COMMENT '培训内容', + `content` mediumtext COMMENT '培训内容', `actual_start_time` datetime DEFAULT NULL COMMENT '实际培训开始时间', `actual_end_time` datetime DEFAULT NULL COMMENT '实际培训结束时间', `command` varchar(250) DEFAULT NULL COMMENT '培训评价', @@ -153,7 +153,7 @@ CREATE TABLE `hzims_conference_record` ( `actual_start_time` datetime DEFAULT NULL COMMENT '会议实际开始时间', `actual_end_time` datetime DEFAULT NULL COMMENT '会议实际结束时间', `recorder` varchar(20) DEFAULT '' COMMENT '记录人', - `content` mediumtext DEFAULT '' DEFAULT '' COMMENT '会议内容', + `content` mediumtext COMMENT '会议内容', `img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '会议图片', `file_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '会议附件', `create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人', @@ -168,7 +168,8 @@ CREATE TABLE `hzims_conference_record` ( CREATE TABLE `hzims_hygiene_plan` ( `id` bigint(20) NOT NULL COMMENT '主键id', - `code` varchar(50) NOT NULL COMMENT '编码', + `unit` varchar(50) NOT NULL COMMENT '单位', + `name` varchar(50) NOT NULL COMMENT '名称', `standard_score` int(10) NOT NULL DEFAULT '100' COMMENT '标准总分值', `scheduled_start_time` date NOT NULL COMMENT '计划开始时间', `scheduled_end_time` date NOT NULL COMMENT '计划结束时间', @@ -210,7 +211,7 @@ CREATE TABLE `hzims_hygiene_record` ( `check_user` varchar(20) NOT NULL DEFAULT '' COMMENT '检查人', `hygiene_zone_ids` varchar(1000) NOT NULL COMMENT '卫生自查区域id', `check_result` mediumtext NOT NULL COMMENT '检查结果', - `comprehensive_score` int(10) NOT NULL COMMENT '综合评分', + `comprehensive_score` varchar(500) NOT NULL COMMENT '综合评分', `week_num` int(10) NOT NULL COMMENT '周数', `img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '检查图片', `create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人', @@ -258,8 +259,8 @@ CREATE TABLE `hzims_car_maintenance` ( `code` varchar(50) NOT NULL COMMENT '编号', `maintenance_type` varchar(50) NOT NULL COMMENT '维保类型', `content` mediumtext NOT NULL COMMENT '维保内容', - `start_time` date NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '维保开始时间', - `end_time` date NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '维保结束时间', + `start_time` date NOT NULL COMMENT '维保开始时间', + `end_time` date NOT NULL COMMENT '维保结束时间', `location` varchar(255) NOT NULL COMMENT '维保地点', `cost` bigint(20) NOT NULL COMMENT '维保费用', `maintainer` varchar(20) NOT NULL COMMENT '维保人', @@ -336,4 +337,9 @@ CREATE TABLE `hzims_car_check_item` ( `status` int(2) NOT NULL DEFAULT '1' COMMENT '状态', `is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='车检项表' ROW_FORMAT=Dynamic; \ No newline at end of file +) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='车检项表' ROW_FORMAT=Dynamic; + +CREATE TABLE `hzims_equipment` ( + `id` bigint(20) NOT NULL COMMENT '主键id', + `name` +) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='特种设备表' ROW_FORMAT=Dynamic; \ No newline at end of file