Browse Source

update: 培训、会议、卫生自查、车辆管理模块

zhongwei
liwen 10 months ago
parent
commit
3c396bb0b7
  1. 2
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/ConferenceExportDTO.java
  2. 2
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/CarUsedRecordEntity.java
  3. 3
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java
  4. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java
  5. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml
  6. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.java
  7. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.xml
  8. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITestScoreService.java
  9. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarCheckRecordServiceImpl.java
  10. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarUsedRecordServiceImpl.java
  11. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TestScoreServiceImpl.java
  12. 1
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/utils/BaseUtil.java
  13. 20
      hzims-service/safeproduct/src/main/resources/db/1.0.2.sql

2
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; private String host;
@ApiModelProperty("会议状态") @ApiModelProperty("会议状态")
@ExcelProperty(value = "会议状态", index = 9) @ExcelProperty(value = "会议状态", index = 7)
private String conferenceStatus; private String conferenceStatus;
} }

2
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("出车公里数") @ApiModelProperty("出车公里数")
private BigDecimal startMiles; private BigDecimal startMiles;
@NotNull
@ApiModelProperty("收车公里数") @ApiModelProperty("收车公里数")
private BigDecimal endMiles; private BigDecimal endMiles;
@NotNull
@ApiModelProperty("行驶公里数") @ApiModelProperty("行驶公里数")
private BigDecimal miles; private BigDecimal miles;

3
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 org.springblade.core.mp.base.BaseEntity;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date; import java.util.Date;
/** /**
@ -21,9 +22,11 @@ import java.util.Date;
@ApiModel(value = "卫生自查计划实体类") @ApiModel(value = "卫生自查计划实体类")
public class HygienePlanEntity extends BaseEntity { public class HygienePlanEntity extends BaseEntity {
@Size(max = 50, message = "计划名称字段长度不能超过50")
@ApiModelProperty("计划名称") @ApiModelProperty("计划名称")
private String name; private String name;
@Size(max = 50, message = "单位字段长度不能超过50")
@ApiModelProperty("单位") @ApiModelProperty("单位")
private String unit; private String unit;

4
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java

@ -194,8 +194,8 @@ public class TrainController extends BladeController {
@GetMapping("/testScoreList") @GetMapping("/testScoreList")
@ApiOperation(value = "考试成绩列表") @ApiOperation(value = "考试成绩列表")
@ApiOperationSupport(order = 18) @ApiOperationSupport(order = 18)
public R<List<TestScoreVO>> testScoreList(@RequestParam Long testId) { public R<List<TestScoreVO>> testScoreList(@RequestParam Long testId, String name) {
List<TestScoreVO> list = testScoreService.testScoreList(testId); List<TestScoreVO> list = testScoreService.testScoreList(testId, name);
return R.data(list); return R.data(list);
} }

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml

@ -4,13 +4,13 @@
<select id="getConferenceRecordDetailById" <select id="getConferenceRecordDetailById"
resultType="com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO"> resultType="com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO">
SELECT SELECT
t1.actual_start_time, t1.actual_end_time, t2.unit, t2.location, t2.host, t2.conference_method, t2.theme, t1.code, t1.actual_start_time, t1.actual_end_time, t2.unit, t2.location, t2.host, t2.conference_method, t2.theme,
t1.recorder, t1.people_name, t1.content, t1.img_path, t1.file_path t1.recorder, t1.people_name, t1.content, t1.img_path, t1.file_path
FROM FROM
hzims_conference_record t1 hzims_conference_record t1
ON hzims_conference_plan t2 ON t1.conference_plan_id = t2.id LEFT JOIN hzims_conference_plan t2 ON t1.conference_plan_id = t2.id
WHERE WHERE
t1.is_deteled = 0 t1.is_deleted = 0
AND t1.id = #{id} AND t1.id = #{id}
</select> </select>
</mapper> </mapper>

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.java

@ -19,7 +19,8 @@ public interface TestScoreMapper extends BaseMapper<TestScoreEntity> {
/** /**
* 查询考试成绩列表 * 查询考试成绩列表
* @param testId 考试记录id * @param testId 考试记录id
* @param name 姓名
* @return 考试成绩列表 * @return 考试成绩列表
*/ */
List<TestScoreVO> testScoreList(Long testId); List<TestScoreVO> testScoreList(Long testId, String name);
} }

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestScoreMapper.xml

@ -12,6 +12,9 @@
<if test="testId != null and testId != ''"> <if test="testId != null and testId != ''">
AND test_id = #{testId} AND test_id = #{testId}
</if> </if>
<if test="name != null and name != ''">
AND name like concat('%', #{name}, '%'}
</if>
ORDER BY ORDER BY
score DESC score DESC
</select> </select>

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITestScoreService.java

@ -18,9 +18,10 @@ public interface ITestScoreService extends IService<TestScoreEntity> {
/** /**
* 查询考试成绩列表 * 查询考试成绩列表
* @param testId 考试记录id * @param testId 考试记录id
* @param name 姓名
* @return 考试成绩列表 * @return 考试成绩列表
*/ */
List<TestScoreVO> testScoreList(Long testId); List<TestScoreVO> testScoreList(Long testId, String name);
/** /**
* 批量填写分数 * 批量填写分数

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarCheckRecordServiceImpl.java

@ -191,9 +191,9 @@ public class CarCheckRecordServiceImpl extends ServiceImpl<CarCheckRecordMapper,
public void exportCarCheckRecordData(Long id, HttpServletResponse response) { public void exportCarCheckRecordData(Long id, HttpServletResponse response) {
CarCheckRecordDetailVO carCheckRecordDetailVO = this.getCarCheckRecord(id); CarCheckRecordDetailVO carCheckRecordDetailVO = this.getCarCheckRecord(id);
Map<String, Object> params = BaseUtil.obj2Map(carCheckRecordDetailVO); Map<String, Object> params = BaseUtil.obj2Map(carCheckRecordDetailVO);
String templateFile = "template/车检记录单" + SafeProductConstant.DOCX_SUFFIX; String templateFile = "template/车辆检查表" + SafeProductConstant.DOCX_SUFFIX;
String wordPath = savePath + "/车检记录单" + SafeProductConstant.DOCX_SUFFIX; String wordPath = savePath + "/车辆检查表" + SafeProductConstant.DOCX_SUFFIX;
String pdfPath = savePath + "/车检记录单" + SafeProductConstant.PDF_SUFFIX; String pdfPath = savePath + "/车辆检查表" + SafeProductConstant.PDF_SUFFIX;
BaseUtil.exportDocument(templateFile, params, wordPath, pdfPath, response); BaseUtil.exportDocument(templateFile, params, wordPath, pdfPath, response);
} }

12
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarUsedRecordServiceImpl.java

@ -54,9 +54,9 @@ public class CarUsedRecordServiceImpl extends ServiceImpl<CarUsedRecordMapper, C
// 若不存在,新增编号 // 若不存在,新增编号
String code = BaseUtil.getUniqueCode("YCJL", lastCode, currentSimpleMonth); String code = BaseUtil.getUniqueCode("YCJL", lastCode, currentSimpleMonth);
carUsedRecordEntity.setCode(code); carUsedRecordEntity.setCode(code);
// 收车公里数 // 行驶公里数
BigDecimal endMiles = carUsedRecordEntity.getStartMiles().add(carUsedRecordEntity.getMiles()); BigDecimal miles = carUsedRecordEntity.getEndMiles().subtract(carUsedRecordEntity.getStartMiles());
carUsedRecordEntity.setEndMiles(endMiles); carUsedRecordEntity.setMiles(miles);
return this.save(carUsedRecordEntity); return this.save(carUsedRecordEntity);
} }
@ -98,9 +98,9 @@ public class CarUsedRecordServiceImpl extends ServiceImpl<CarUsedRecordMapper, C
*/ */
@Override @Override
public boolean updateCarUsedRecord(CarUsedRecordEntity carUsedRecordEntity) { public boolean updateCarUsedRecord(CarUsedRecordEntity carUsedRecordEntity) {
// 收车公里数 // 行驶公里数
BigDecimal endMiles = carUsedRecordEntity.getStartMiles().add(carUsedRecordEntity.getMiles()); BigDecimal miles = carUsedRecordEntity.getEndMiles().subtract(carUsedRecordEntity.getStartMiles());
carUsedRecordEntity.setEndMiles(endMiles); carUsedRecordEntity.setMiles(miles);
return this.save(carUsedRecordEntity); return this.save(carUsedRecordEntity);
} }

4
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TestScoreServiceImpl.java

@ -28,8 +28,8 @@ public class TestScoreServiceImpl extends ServiceImpl<TestScoreMapper, TestScore
* 查询考试成绩列表 * 查询考试成绩列表
*/ */
@Override @Override
public List<TestScoreVO> testScoreList(Long testId) { public List<TestScoreVO> testScoreList(Long testId, String name) {
return baseMapper.testScoreList(testId); return baseMapper.testScoreList(testId, name);
} }
/** /**

1
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); xwpfDocument = WordExportUtil.exportWord07(templatePath, params);
} catch (Exception e) { } catch (Exception e) {
log.error("数据写入异常: {}", e.getMessage()); log.error("数据写入异常: {}", e.getMessage());
e.printStackTrace();
} }
return xwpfDocument; return xwpfDocument;
} }

20
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 '培训记录名称', `train_record_name` varchar(50) NOT NULL DEFAULT '' COMMENT '培训记录名称',
`code` varchar(50) NOT NULL COMMENT '编号', `code` varchar(50) NOT NULL COMMENT '编号',
`people_name` varchar(5000) DEFAULT '' COMMENT '培训学员', `people_name` varchar(5000) DEFAULT '' COMMENT '培训学员',
`content` mediumtext DEFAULT '' COMMENT '培训内容', `content` mediumtext COMMENT '培训内容',
`actual_start_time` datetime DEFAULT NULL COMMENT '实际培训开始时间', `actual_start_time` datetime DEFAULT NULL COMMENT '实际培训开始时间',
`actual_end_time` datetime DEFAULT NULL COMMENT '实际培训结束时间', `actual_end_time` datetime DEFAULT NULL COMMENT '实际培训结束时间',
`command` varchar(250) 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_start_time` datetime DEFAULT NULL COMMENT '会议实际开始时间',
`actual_end_time` datetime DEFAULT NULL COMMENT '会议实际结束时间', `actual_end_time` datetime DEFAULT NULL COMMENT '会议实际结束时间',
`recorder` varchar(20) DEFAULT '' COMMENT '记录人', `recorder` varchar(20) DEFAULT '' COMMENT '记录人',
`content` mediumtext DEFAULT '' DEFAULT '' COMMENT '会议内容', `content` mediumtext COMMENT '会议内容',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '会议图片', `img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '会议图片',
`file_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '会议附件', `file_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '会议附件',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人', `create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
@ -168,7 +168,8 @@ CREATE TABLE `hzims_conference_record` (
CREATE TABLE `hzims_hygiene_plan` ( CREATE TABLE `hzims_hygiene_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id', `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 '标准总分值', `standard_score` int(10) NOT NULL DEFAULT '100' COMMENT '标准总分值',
`scheduled_start_time` date NOT NULL COMMENT '计划开始时间', `scheduled_start_time` date NOT NULL COMMENT '计划开始时间',
`scheduled_end_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 '检查人', `check_user` varchar(20) NOT NULL DEFAULT '' COMMENT '检查人',
`hygiene_zone_ids` varchar(1000) NOT NULL COMMENT '卫生自查区域id', `hygiene_zone_ids` varchar(1000) NOT NULL COMMENT '卫生自查区域id',
`check_result` mediumtext NOT NULL COMMENT '检查结果', `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 '周数', `week_num` int(10) NOT NULL COMMENT '周数',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '检查图片', `img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '检查图片',
`create_user` bigint(20) NOT NULL DEFAULT '-1' 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 '编号', `code` varchar(50) NOT NULL COMMENT '编号',
`maintenance_type` varchar(50) NOT NULL COMMENT '维保类型', `maintenance_type` varchar(50) NOT NULL COMMENT '维保类型',
`content` mediumtext NOT NULL COMMENT '维保内容', `content` mediumtext NOT NULL COMMENT '维保内容',
`start_time` date NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '维保开始时间', `start_time` date NOT NULL COMMENT '维保开始时间',
`end_time` date NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '维保结束时间', `end_time` date NOT NULL COMMENT '维保结束时间',
`location` varchar(255) NOT NULL COMMENT '维保地点', `location` varchar(255) NOT NULL COMMENT '维保地点',
`cost` bigint(20) NOT NULL COMMENT '维保费用', `cost` bigint(20) NOT NULL COMMENT '维保费用',
`maintainer` varchar(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 '状态', `status` int(2) NOT NULL DEFAULT '1' COMMENT '状态',
`is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除', `is_deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除状态:0-未删除,1-删除',
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='车检项表' ROW_FORMAT=Dynamic; ) 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;
Loading…
Cancel
Save