Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 10 months ago
parent
commit
831da99b43
  1. 2
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygieneRecordEntity.java
  2. 5
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygieneZoneEntity.java
  3. 10
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TrainRecordEntity.java
  4. 31
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/enums/TrainMethodEnum.java
  5. 52
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java
  6. 2
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailVO.java
  7. 55
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TrainRecordDetailVO.java
  8. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java
  9. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java
  10. 8
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java
  11. 8
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java
  12. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java
  13. 39
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/jobs/ConferenceJob.java
  14. 39
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/jobs/HygieneJob.java
  15. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/jobs/RehearsalJob.java
  16. 7
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.java
  17. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml
  18. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.java
  19. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.xml
  20. 8
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.java
  21. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.xml
  22. 9
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IConferencePlanService.java
  23. 17
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IConferenceRecordService.java
  24. 9
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IHygienePlanService.java
  25. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IHygieneRecordService.java
  26. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IRehearsalRecordService.java
  27. 13
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITrainRecordService.java
  28. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferencePlanServiceImpl.java
  29. 38
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java
  30. 13
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygienePlanServiceImpl.java
  31. 66
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java
  32. 20
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java
  33. 90
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java
  34. 341
      hzims-service/safeproduct/src/main/resources/db/1.0.1.sql
  35. 338
      hzims-service/safeproduct/src/main/resources/db/1.0.2.sql
  36. BIN
      hzims-service/safeproduct/src/main/resources/template/会议记录表.docx
  37. BIN
      hzims-service/safeproduct/src/main/resources/template/卫生自查表.docx
  38. BIN
      hzims-service/safeproduct/src/main/resources/template/培训记录表.docx
  39. BIN
      hzims-service/safeproduct/src/main/resources/template/演练记录表.docx
  40. BIN
      hzims-service/safeproduct/src/main/resources/template/用车记录单.docx
  41. BIN
      hzims-service/safeproduct/src/main/resources/template/车辆检查表.docx
  42. BIN
      hzims-service/safeproduct/src/main/resources/template/车辆维保记录单.docx

2
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygieneRecordEntity.java

@ -39,9 +39,11 @@ public class HygieneRecordEntity extends BaseEntity {
@ApiModelProperty("实际结束时间") @ApiModelProperty("实际结束时间")
private Date actualEndTime; private Date actualEndTime;
@Size(max = 20, message = "检查人字段长度不能超过20")
@ApiModelProperty("检查人") @ApiModelProperty("检查人")
private String checkUser; private String checkUser;
@Size(max = 1000, message = "责任区id字段长度不能超过1000")
@ApiModelProperty("责任区id") @ApiModelProperty("责任区id")
private String hygieneZoneIds; private String hygieneZoneIds;

5
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygieneZoneEntity.java

@ -7,6 +7,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.base.BaseEntity;
import javax.validation.constraints.Size;
/** /**
* @author liwen * @author liwen
* @date 2024-01-02 * @date 2024-01-02
@ -20,15 +22,18 @@ public class HygieneZoneEntity extends BaseEntity {
@ApiModelProperty("卫生自查计划id") @ApiModelProperty("卫生自查计划id")
private Long hygienePlanId; private Long hygienePlanId;
@Size(max = 50, message = "责任区字段长度不能超过50")
@ApiModelProperty("责任区") @ApiModelProperty("责任区")
private String zone; private String zone;
@Size(max = 20, message = "责任人字段长度不能超过20")
@ApiModelProperty("责任人") @ApiModelProperty("责任人")
private String principal; private String principal;
@ApiModelProperty("检查项") @ApiModelProperty("检查项")
private String checkItem; private String checkItem;
@Size(max = 255, message = "检查项分值字段长度不能超过255")
@ApiModelProperty("检查项分值") @ApiModelProperty("检查项分值")
private String checkItemScore; private String checkItemScore;
} }

10
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TrainRecordEntity.java

@ -1,7 +1,5 @@
package com.hnac.hzims.safeproduct.entity; package com.hnac.hzims.safeproduct.entity;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -18,7 +16,6 @@ import java.util.Date;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ExcelIgnoreUnannotated
@TableName("hzims_train_record") @TableName("hzims_train_record")
@ApiModel(value = "培训记录实体类") @ApiModel(value = "培训记录实体类")
public class TrainRecordEntity extends BaseEntity { public class TrainRecordEntity extends BaseEntity {
@ -28,34 +25,27 @@ public class TrainRecordEntity extends BaseEntity {
@Size(max = 50, message = "名称字段长度不能超过50") @Size(max = 50, message = "名称字段长度不能超过50")
@ApiModelProperty("培训记录名称") @ApiModelProperty("培训记录名称")
@ExcelProperty(value = "培训记录名称", index = 1)
private String trainRecordName; private String trainRecordName;
@Size(max = 50, message = "编码字段长度不能超过50") @Size(max = 50, message = "编码字段长度不能超过50")
@ApiModelProperty("编码") @ApiModelProperty("编码")
@ExcelProperty(value = "编码", index = 0)
private String code; private String code;
@Size(max = 5000, message = "培训学员字段长度超出限制范围") @Size(max = 5000, message = "培训学员字段长度超出限制范围")
@ApiModelProperty("培训学员") @ApiModelProperty("培训学员")
@ExcelProperty(value = "培训学员", index = 3)
private String peopleName; private String peopleName;
@ApiModelProperty("培训内容") @ApiModelProperty("培训内容")
@ExcelProperty(value = "培训内容", index = 2)
private String content; private String content;
@ApiModelProperty("实际培训开始时间") @ApiModelProperty("实际培训开始时间")
@ExcelProperty(value = "实际开始时间", index = 5)
private Date actualStartTime; private Date actualStartTime;
@ApiModelProperty("实际培训结束时间") @ApiModelProperty("实际培训结束时间")
@ExcelProperty(value = "实际结束时间", index = 6)
private Date actualEndTime; private Date actualEndTime;
@Size(max = 250, message = "培训评价字段长度不能超过250") @Size(max = 250, message = "培训评价字段长度不能超过250")
@ApiModelProperty("培训评价") @ApiModelProperty("培训评价")
@ExcelProperty(value = "培训评价", index = 4)
private String command; private String command;
@Size(max = 1000, message = "培训图片字段长度不能超过1000") @Size(max = 1000, message = "培训图片字段长度不能超过1000")

31
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/enums/TrainMethodEnum.java

@ -0,0 +1,31 @@
package com.hnac.hzims.safeproduct.enums;
/**
* 培训方式枚举类
*
* @author liwen
* @date 2024-01-15
*/
public enum TrainMethodEnum {
ONLINE("ONLINE", "线上"),
OFFLINE("OFFLINE", "线下"),
MIXED("MIXED", "线上+线下");
private final String value;
private final String desc;
TrainMethodEnum(String value, String desc) {
this.value = value;
this.desc = desc;
}
public String getValue() {
return value;
}
public String getDesc() {
return desc;
}
}

52
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java

@ -0,0 +1,52 @@
package com.hnac.hzims.safeproduct.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author liwen
* @date 2024-01-15
*/
@Data
@ApiModel(value = "会议记录表VO类")
public class ConferenceRecordDetailVO {
@ApiModelProperty("会议实际开始时间")
private Date actualStartTime;
@ApiModelProperty("会议实际结束时间")
private Date actualEndTime;
@ApiModelProperty("单位")
private String unit;
@ApiModelProperty("会议地点")
private String location;
@ApiModelProperty("主持人")
private String host;
@ApiModelProperty("会议方式")
private String conferenceMethod;
@ApiModelProperty("会议主题")
private String theme;
@ApiModelProperty("记录人")
private String recorder;
@ApiModelProperty("参会人员")
private String peopleName;
@ApiModelProperty("会议内容")
private String content;
@ApiModelProperty("会议图片")
private String imgPath;
@ApiModelProperty("会议附件")
private String filePath;
}

2
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalDetailVO.java → hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailVO.java

@ -12,7 +12,7 @@ import java.util.Date;
*/ */
@Data @Data
@ApiModel(value = "演练记录表VO类") @ApiModel(value = "演练记录表VO类")
public class RehearsalDetailVO { public class RehearsalRecordDetailVO {
@ApiModelProperty("编码") @ApiModelProperty("编码")
private String code; private String code;

55
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TrainRecordDetailVO.java

@ -0,0 +1,55 @@
package com.hnac.hzims.safeproduct.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author liwen
* @date 2024-01-15
*/
@Data
@ApiModel(value = "培训记录表VO类")
public class TrainRecordDetailVO {
@ApiModelProperty("编码")
private String code;
@ApiModelProperty("实际培训开始时间")
private Date actualStartTime;
@ApiModelProperty("实际培训结束时间")
private Date actualEndTime;
@ApiModelProperty("单位")
private String unit;
@ApiModelProperty("培训地点")
private String location;
@ApiModelProperty("培训方式")
private String trainMethod;
@ApiModelProperty("培训讲师")
private String teacher;
@ApiModelProperty("培训课程")
private String lesson;
@ApiModelProperty("培训学员")
private String peopleName;
@ApiModelProperty("培训内容")
private String content;
@ApiModelProperty("培训评价")
private String command;
@ApiModelProperty("培训图片")
private String imgPath;
@ApiModelProperty("培训附件")
private String filePath;
}

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

@ -254,6 +254,10 @@ public class CarController extends BladeController {
} }
@GetMapping("/exportCarMilesData") @GetMapping("/exportCarMilesData")
@ApiImplicitParams({
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "year", value = "年份", dataType = "query", paramType = "string")
})
@ApiOperation(value = "导出年度里程数据") @ApiOperation(value = "导出年度里程数据")
@ApiOperationSupport(order = 27) @ApiOperationSupport(order = 27)
public void exportCarMilesData(@ApiIgnore @RequestParam Map<String, Object> param, Query query, HttpServletResponse response) { public void exportCarMilesData(@ApiIgnore @RequestParam Map<String, Object> param, Query query, HttpServletResponse response) {

12
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java

@ -7,6 +7,7 @@ import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.service.IConferencePlanService; import com.hnac.hzims.safeproduct.service.IConferencePlanService;
import com.hnac.hzims.safeproduct.service.IConferenceRecordService; import com.hnac.hzims.safeproduct.service.IConferenceRecordService;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -103,8 +104,8 @@ public class ConferenceController extends BladeController {
@GetMapping("/recordDetail") @GetMapping("/recordDetail")
@ApiOperation(value = "会议记录详情") @ApiOperation(value = "会议记录详情")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
public R<ConferenceRecordEntity> recordDetail(@RequestParam Long id) { public R<ConferenceRecordDetailVO> recordDetail(@RequestParam Long id) {
return R.data(conferenceRecordService.getById(id)); return R.data(conferenceRecordService.getConferenceRecordDetailById(id));
} }
@GetMapping("/recordPage") @GetMapping("/recordPage")
@ -130,4 +131,11 @@ public class ConferenceController extends BladeController {
public void exportConferenceData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) { public void exportConferenceData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) {
conferencePlanService.exportConferenceData(param, response); conferencePlanService.exportConferenceData(param, response);
} }
@GetMapping("/exportConferenceRecordData")
@ApiOperation(value = "会议记录表导出")
@ApiOperationSupport(order = 12)
public void exportConferenceRecordData(@RequestParam Long id, HttpServletResponse response) {
conferenceRecordService.exportConferenceRecordData(id, response);
}
} }

8
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java

@ -131,11 +131,11 @@ public class HygieneController extends BladeController {
return R.data(page); return R.data(page);
} }
@GetMapping("/exportHygieneData") @GetMapping("/exportHygieneRecordData")
@ApiOperation(value = "卫生自查数据导出") @ApiOperation(value = "卫生自查记录表导出")
@ApiOperationSupport(order = 12) @ApiOperationSupport(order = 12)
public void exportHygieneData(@RequestParam Long hygieneRecordId, HttpServletResponse response) { public void exportHygieneRecordData(@RequestParam Long id, HttpServletResponse response) {
hygieneRecordService.exportHygieneData(hygieneRecordId, response); hygieneRecordService.exportHygieneRecordData(id, response);
} }
@GetMapping("/exportMonthData") @GetMapping("/exportMonthData")

8
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java

@ -7,7 +7,7 @@ import com.hnac.hzims.safeproduct.entity.RehearsalPlanEntity;
import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity; import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity;
import com.hnac.hzims.safeproduct.service.IRehearsalPlanService; import com.hnac.hzims.safeproduct.service.IRehearsalPlanService;
import com.hnac.hzims.safeproduct.service.IRehearsalRecordService; import com.hnac.hzims.safeproduct.service.IRehearsalRecordService;
import com.hnac.hzims.safeproduct.vo.RehearsalDetailVO; import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.RehearsalMonthVO; import com.hnac.hzims.safeproduct.vo.RehearsalMonthVO;
import com.hnac.hzims.safeproduct.vo.RehearsalYearVO; import com.hnac.hzims.safeproduct.vo.RehearsalYearVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -106,7 +106,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/rehearsalRecordDetail") @GetMapping("/rehearsalRecordDetail")
@ApiOperation(value = "演练记录详情") @ApiOperation(value = "演练记录详情")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
public R<RehearsalDetailVO> rehearsalRecordDetail(@RequestParam Long id) { public R<RehearsalRecordDetailVO> rehearsalRecordDetail(@RequestParam Long id) {
return R.data(rehearsalRecordService.getRecordDetailVOById(id)); return R.data(rehearsalRecordService.getRecordDetailVOById(id));
} }
@ -153,7 +153,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/exportRecordDetailData") @GetMapping("/exportRecordDetailData")
@ApiOperation(value = "演练记录表导出") @ApiOperation(value = "演练记录表导出")
@ApiOperationSupport(order = 14) @ApiOperationSupport(order = 14)
public void exportRecordDetailData(@RequestParam Long id, HttpServletResponse response) { public void exportRehearsalRecordData(@RequestParam Long id, HttpServletResponse response) {
rehearsalRecordService.exportRecordDetailData(id, response); rehearsalRecordService.exportRehearsalRecordData(id, response);
} }
} }

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

@ -15,6 +15,7 @@ import com.hnac.hzims.safeproduct.service.ITrainPlanService;
import com.hnac.hzims.safeproduct.service.ITrainRecordService; import com.hnac.hzims.safeproduct.service.ITrainRecordService;
import com.hnac.hzims.safeproduct.vo.TestScoreVO; import com.hnac.hzims.safeproduct.vo.TestScoreVO;
import com.hnac.hzims.safeproduct.vo.TrainMonthVO; 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.TrainYearVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
@ -117,8 +118,8 @@ public class TrainController extends BladeController {
@GetMapping("/trainRecordDetail") @GetMapping("/trainRecordDetail")
@ApiOperation(value = "培训记录详情") @ApiOperation(value = "培训记录详情")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
public R<TrainRecordEntity> trainRecordDetail(@RequestParam Long id) { public R<TrainRecordDetailVO> trainRecordDetail(@RequestParam Long id) {
return R.data(trainRecordService.getById(id)); return R.data(trainRecordService.getTrainRecordDetailById(id));
} }
@GetMapping("/trainRecordPage") @GetMapping("/trainRecordPage")
@ -234,12 +235,9 @@ public class TrainController extends BladeController {
} }
@GetMapping("/exportTrainRecordData") @GetMapping("/exportTrainRecordData")
@ApiImplicitParams({ @ApiOperation(value = "培训记录表导出")
@ApiImplicitParam(name = "trainPlanId", value = "培训计划id", dataType = "query", paramType = "string")
})
@ApiOperation(value = "培训记录数据导出")
@ApiOperationSupport(order = 23) @ApiOperationSupport(order = 23)
public void exportTrainRecordData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) { public void exportTrainRecordData(@RequestParam Long id, HttpServletResponse response) {
trainRecordService.exportTrainRecordData(param, response); trainRecordService.exportTrainRecordData(id, response);
} }
} }

39
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/jobs/ConferenceJob.java

@ -1,4 +1,43 @@
package com.hnac.hzims.safeproduct.jobs; package com.hnac.hzims.safeproduct.jobs;
import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity;
import com.hnac.hzims.safeproduct.enums.ConferenceStatusEnum;
import com.hnac.hzims.safeproduct.service.IConferencePlanService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
/**
* 会议管理模块定时任务
*
* @author liwen
* @date 2024-01-15
*/
@Component
public class ConferenceJob { public class ConferenceJob {
@Autowired
IConferencePlanService conferencePlanService;
@XxlJob("autoChangeConferencePlanStatus")
public ReturnT<String> autoChangeConferencePlanStatus(String param) {
// 获取时间范围
Date current = DateUtil.now();
Date before = DateUtil.minusDays(current, 1);
String today = DateUtil.format(current, "yyyy-mm-dd hh:MM:ss");
String yesterday = DateUtil.format(before, "yyyy-mm-dd hh:MM:ss");
// 查询前一天的超时未完成会议计划
List<ConferencePlanEntity> list = conferencePlanService.getWaitingConferencePlanInTimeRange(yesterday, today);
list.forEach(x -> {
x.setConferenceStatus(ConferenceStatusEnum.UNFINISHED.getValue());
});
// 将状态置为未完成
boolean flag = conferencePlanService.updateBatchById(list);
return flag ? ReturnT.SUCCESS : ReturnT.FAIL;
}
} }

39
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/jobs/HygieneJob.java

@ -1,4 +1,43 @@
package com.hnac.hzims.safeproduct.jobs; package com.hnac.hzims.safeproduct.jobs;
import com.hnac.hzims.safeproduct.entity.HygienePlanEntity;
import com.hnac.hzims.safeproduct.enums.TrainStatusEnum;
import com.hnac.hzims.safeproduct.service.IHygienePlanService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
/**
* 卫生自查模块定时任务
*
* @author liwen
* @date 2024-01-15
*/
@Component
public class HygieneJob { public class HygieneJob {
@Autowired
IHygienePlanService hygienePlanService;
@XxlJob("autoChangeHygienePlanStatus")
public ReturnT<String> autoChangeHygienePlanStatus(String param) {
// 获取时间范围
Date current = DateUtil.now();
Date before = DateUtil.minusDays(current, 1);
String today = DateUtil.format(current, "yyyy-mm-dd hh:MM:ss");
String yesterday = DateUtil.format(before, "yyyy-mm-dd hh:MM:ss");
// 查询前一天的超时未完成卫生自查计划
List<HygienePlanEntity> list = hygienePlanService.getWaitingHygienePlanInTimeRange(yesterday, today);
list.forEach(x -> {
x.setHygienePlanStatus(TrainStatusEnum.UNFINISHED.getValue());
});
// 将状态置为未完成
boolean flag = hygienePlanService.updateBatchById(list);
return flag ? ReturnT.SUCCESS : ReturnT.FAIL;
}
} }

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/jobs/RehearsalJob.java

@ -31,7 +31,7 @@ public class RehearsalJob {
Date before = DateUtil.minusDays(current, 1); Date before = DateUtil.minusDays(current, 1);
String today = DateUtil.format(current, "yyyy-mm-dd hh:MM:ss"); String today = DateUtil.format(current, "yyyy-mm-dd hh:MM:ss");
String yesterday = DateUtil.format(before, "yyyy-mm-dd hh:MM:ss"); String yesterday = DateUtil.format(before, "yyyy-mm-dd hh:MM:ss");
// 查询前一天的超时未完成演练记录 // 查询前一天的超时未完成演练计划
List<RehearsalPlanEntity> list = rehearsalPlanService.getWaitingRehearsalInTimeRange(yesterday, today); List<RehearsalPlanEntity> list = rehearsalPlanService.getWaitingRehearsalInTimeRange(yesterday, today);
list.forEach(x -> { list.forEach(x -> {
x.setRehearsalStatus(RehearsalStatusEnum.UNFINISHED.getValue()); x.setRehearsalStatus(RehearsalStatusEnum.UNFINISHED.getValue());

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

@ -2,6 +2,7 @@ package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
/** /**
@ -13,4 +14,10 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface ConferenceRecordMapper extends BaseMapper<ConferenceRecordEntity> { public interface ConferenceRecordMapper extends BaseMapper<ConferenceRecordEntity> {
/**
* 查询会议记录表详情
* @param id 会议记录id
* @return 会议记录表VO类
*/
ConferenceRecordDetailVO getConferenceRecordDetailById(Long id);
} }

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

@ -1,4 +1,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.safeproduct.mapper.ConferenceRecordMapper"> <mapper namespace="com.hnac.hzims.safeproduct.mapper.ConferenceRecordMapper">
<select id="getConferenceRecordDetailById"
resultType="com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO">
SELECT
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
FROM
hzims_conference_record t1
ON hzims_conference_plan t2 ON t1.conference_plan_id = t2.id
WHERE
t1.is_deteled = 0
AND t1.id = #{id}
</select>
</mapper> </mapper>

4
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.java

@ -2,7 +2,7 @@ package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity; import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity;
import com.hnac.hzims.safeproduct.vo.RehearsalDetailVO; import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
/** /**
@ -19,5 +19,5 @@ public interface RehearsalRecordMapper extends BaseMapper<RehearsalRecordEntity>
* @param id 演练记录id * @param id 演练记录id
* @return 演练记录表VO类 * @return 演练记录表VO类
*/ */
RehearsalDetailVO getRecordDetailVOById(Long id); RehearsalRecordDetailVO getRecordDetailVOById(Long id);
} }

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.xml

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.safeproduct.mapper.RehearsalRecordMapper"> <mapper namespace="com.hnac.hzims.safeproduct.mapper.RehearsalRecordMapper">
<select id="getRecordDetailVOById" resultType="com.hnac.hzims.safeproduct.vo.RehearsalDetailVO"> <select id="getRecordDetailVOById" resultType="com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO">
SELECT SELECT
t1.code, t1.actual_start_time, t1.actual_end_time, t2.unit, t2.location, t2.rehearsal_method, t2.commander, t1.code, t1.actual_start_time, t1.actual_end_time, t2.unit, t2.location, t2.rehearsal_method, t2.commander,
t2.subject, t1.people_name, t1.record, t1.img_path, t1.command, t1.file_path t2.subject, t1.people_name, t1.record, t1.img_path, t1.command, t1.file_path

8
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.java

@ -3,6 +3,7 @@ package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.safeproduct.dto.TrainRecordDTO; import com.hnac.hzims.safeproduct.dto.TrainRecordDTO;
import com.hnac.hzims.safeproduct.entity.TrainRecordEntity; import com.hnac.hzims.safeproduct.entity.TrainRecordEntity;
import com.hnac.hzims.safeproduct.vo.TrainRecordDetailVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@ -22,4 +23,11 @@ public interface TrainRecordMapper extends BaseMapper<TrainRecordEntity> {
* @return 培训记录名称列表 * @return 培训记录名称列表
*/ */
List<TrainRecordDTO> getTrainRecordNameList(String trainPlanId); List<TrainRecordDTO> getTrainRecordNameList(String trainPlanId);
/**
* 查询培训记录表详情
* @param id 培训记录id
* @return 培训记录表VO类
*/
TrainRecordDetailVO getTrainRecordDetailById(Long id);
} }

12
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.xml

@ -15,4 +15,16 @@
ORDER BY ORDER BY
create_time DESC create_time DESC
</select> </select>
<select id="getTrainRecordDetailById" resultType="com.hnac.hzims.safeproduct.vo.TrainRecordDetailVO">
SELECT
t1.code, t1.actual_start_time, t1.actual_end_time, t2.unit, t2.location, t2.train_method, t2.teacher, t2.lesson,
t1.people_name, t1.content, t1.img_path, t1.command, t1.file_path
FROM
hzims_train_record t1
LEFT JOIN hzims_train_plan t2 ON t1.train_plan_id = t2.id
WHERE
t1.is_deleted = 0
AND t1.id = #{id}
</select>
</mapper> </mapper>

9
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IConferencePlanService.java

@ -6,6 +6,7 @@ import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -37,4 +38,12 @@ public interface IConferencePlanService extends IService<ConferencePlanEntity> {
* @param response 响应类 * @param response 响应类
*/ */
void exportConferenceData(Map<String, Object> param, HttpServletResponse response); void exportConferenceData(Map<String, Object> param, HttpServletResponse response);
/**
* 查询时间范围内未开始的会议计划数据
* @param startTime 开始时间
* @param endTime 结束时间
* @return 会议计划数据
*/
List<ConferencePlanEntity> getWaitingConferencePlanInTimeRange(String startTime, String endTime);
} }

17
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IConferenceRecordService.java

@ -2,6 +2,9 @@ package com.hnac.hzims.safeproduct.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import javax.servlet.http.HttpServletResponse;
/** /**
* 会议记录服务类 * 会议记录服务类
@ -24,4 +27,18 @@ public interface IConferenceRecordService extends IService<ConferenceRecordEntit
* @return true-成功false-失败 * @return true-成功false-失败
*/ */
boolean saveRecord(ConferenceRecordEntity conferenceRecord); boolean saveRecord(ConferenceRecordEntity conferenceRecord);
/**
* 会议记录表导出
* @param id 会议记录id
* @param response 响应类
*/
void exportConferenceRecordData(Long id, HttpServletResponse response);
/**
* 查询会议记录表详情
* @param id 会议记录id
* @return 会议记录表VO类
*/
ConferenceRecordDetailVO getConferenceRecordDetailById(Long id);
} }

9
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IHygienePlanService.java

@ -10,6 +10,7 @@ import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -76,4 +77,12 @@ public interface IHygienePlanService extends IService<HygienePlanEntity> {
* 月度数据导出 * 月度数据导出
*/ */
void exportMonthData(Map<String, Object> param, Query query, HttpServletResponse response); void exportMonthData(Map<String, Object> param, Query query, HttpServletResponse response);
/**
* 查询时间范围内未开始的卫生自查计划数据
* @param startTime 开始时间
* @param endTime 结束时间
* @return 卫生自查计划数据
*/
List<HygienePlanEntity> getWaitingHygienePlanInTimeRange(String startTime, String endTime);
} }

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

@ -57,9 +57,9 @@ public interface IHygieneRecordService extends IService<HygieneRecordEntity> {
IPage<HygieneRecordPageVO> recordPage(Map<String, Object> param, Query query); IPage<HygieneRecordPageVO> recordPage(Map<String, Object> param, Query query);
/** /**
* 卫生自查记录数据导出 * 卫生自查记录导出
* @param hygieneRecordId 卫生自查记录id * @param id 卫生自查记录id
* @param response 响应类 * @param response 响应类
*/ */
void exportHygieneData(Long hygieneRecordId, HttpServletResponse response); void exportHygieneRecordData(Long id, HttpServletResponse response);
} }

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

@ -2,7 +2,7 @@ package com.hnac.hzims.safeproduct.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity; import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity;
import com.hnac.hzims.safeproduct.vo.RehearsalDetailVO; import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -40,12 +40,12 @@ public interface IRehearsalRecordService extends IService<RehearsalRecordEntity>
* @param id 演练记录id * @param id 演练记录id
* @param response 响应类 * @param response 响应类
*/ */
void exportRecordDetailData(Long id, HttpServletResponse response); void exportRehearsalRecordData(Long id, HttpServletResponse response);
/** /**
* 查询演练记录表详情 * 查询演练记录表详情
* @param id 演练记录id * @param id 演练记录id
* @return 演练记录表VO类 * @return 演练记录表VO类
*/ */
RehearsalDetailVO getRecordDetailVOById(Long id); RehearsalRecordDetailVO getRecordDetailVOById(Long id);
} }

13
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITrainRecordService.java

@ -3,10 +3,10 @@ package com.hnac.hzims.safeproduct.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.safeproduct.dto.TrainRecordDTO; import com.hnac.hzims.safeproduct.dto.TrainRecordDTO;
import com.hnac.hzims.safeproduct.entity.TrainRecordEntity; import com.hnac.hzims.safeproduct.entity.TrainRecordEntity;
import com.hnac.hzims.safeproduct.vo.TrainRecordDetailVO;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 培训记录服务类 * 培训记录服务类
@ -53,8 +53,15 @@ public interface ITrainRecordService extends IService<TrainRecordEntity> {
/** /**
* 培训记录数据导出 * 培训记录数据导出
* @param param 入参 * @param id 培训记录id
* @param response 响应类 * @param response 响应类
*/ */
void exportTrainRecordData(Map<String, Object> param, HttpServletResponse response); void exportTrainRecordData(Long id, HttpServletResponse response);
/**
* 查询培训记录表详情
* @param id 培训记录id
* @return 培训记录表VO类
*/
TrainRecordDetailVO getTrainRecordDetailById(Long id);
} }

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

@ -147,6 +147,18 @@ public class ConferencePlanServiceImpl extends ServiceImpl<ConferencePlanMapper,
} }
/** /**
* 查询时间范围内未开始的会议计划数据
*/
@Override
public List<ConferencePlanEntity> getWaitingConferencePlanInTimeRange(String startTime, String endTime) {
QueryWrapper<ConferencePlanEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ConferencePlanEntity::getConferenceStatus, ConferenceStatusEnum.WAITING.getValue())
.ge(ConferencePlanEntity::getScheduledEndTime, startTime)
.le(ConferencePlanEntity::getScheduledEndTime, endTime);
return this.list(queryWrapper);
}
/**
* 根据单位和计划时间查询会议记录 * 根据单位和计划时间查询会议记录
* @param unit 单位 * @param unit 单位
* @param startTime 计划开始时间 * @param startTime 计划开始时间

38
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java

@ -7,16 +7,21 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.safeproduct.constants.SafeProductConstant; import com.hnac.hzims.safeproduct.constants.SafeProductConstant;
import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity; import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.enums.ConferenceMethodEnum;
import com.hnac.hzims.safeproduct.enums.RehearsalStatusEnum; import com.hnac.hzims.safeproduct.enums.RehearsalStatusEnum;
import com.hnac.hzims.safeproduct.mapper.ConferencePlanMapper; import com.hnac.hzims.safeproduct.mapper.ConferencePlanMapper;
import com.hnac.hzims.safeproduct.mapper.ConferenceRecordMapper; import com.hnac.hzims.safeproduct.mapper.ConferenceRecordMapper;
import com.hnac.hzims.safeproduct.service.IConferenceRecordService; import com.hnac.hzims.safeproduct.service.IConferenceRecordService;
import com.hnac.hzims.safeproduct.utils.BaseUtil; import com.hnac.hzims.safeproduct.utils.BaseUtil;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -31,6 +36,9 @@ public class ConferenceRecordServiceImpl extends ServiceImpl<ConferenceRecordMap
@Resource @Resource
ConferencePlanMapper conferencePlanMapper; ConferencePlanMapper conferencePlanMapper;
@Value("${hzims.conference.savePath}")
private String savePath;
/** /**
* 删除关联会议记录 * 删除关联会议记录
*/ */
@ -72,6 +80,36 @@ public class ConferenceRecordServiceImpl extends ServiceImpl<ConferenceRecordMap
} }
/** /**
* 会议记录表导出
*/
@Override
public void exportConferenceRecordData(Long id, HttpServletResponse response) {
ConferenceRecordDetailVO conferenceRecordDetailVO = this.getConferenceRecordDetailById(id);
// 会议方式字段
String conferenceMethod = conferenceRecordDetailVO.getConferenceMethod();
if (conferenceMethod.equals(ConferenceMethodEnum.MIXED.getValue())) {
conferenceRecordDetailVO.setConferenceMethod(ConferenceMethodEnum.MIXED.getDesc());
} else if (conferenceMethod.equals(ConferenceMethodEnum.ONLINE.getValue())) {
conferenceRecordDetailVO.setConferenceMethod(ConferenceMethodEnum.ONLINE.getDesc());
} else {
conferenceRecordDetailVO.setConferenceMethod(ConferenceMethodEnum.OFFLINE.getDesc());
}
Map<String, Object> params = BaseUtil.obj2Map(conferenceRecordDetailVO);
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);
}
/**
* 查询会议记录表详情
*/
@Override
public ConferenceRecordDetailVO getConferenceRecordDetailById(Long id) {
return baseMapper.getConferenceRecordDetailById(id);
}
/**
* 查询是否存在同月编号 * 查询是否存在同月编号
* @param currentMonth 当月 * @param currentMonth 当月
* @return 存在则返回上一编号否则返回null * @return 存在则返回上一编号否则返回null

13
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygienePlanServiceImpl.java

@ -13,6 +13,7 @@ import com.hnac.hzims.common.utils.Condition;
import com.hnac.hzims.safeproduct.dto.HygienePlanDTO; import com.hnac.hzims.safeproduct.dto.HygienePlanDTO;
import com.hnac.hzims.safeproduct.entity.HygienePlanEntity; import com.hnac.hzims.safeproduct.entity.HygienePlanEntity;
import com.hnac.hzims.safeproduct.entity.HygieneZoneEntity; import com.hnac.hzims.safeproduct.entity.HygieneZoneEntity;
import com.hnac.hzims.safeproduct.enums.HygieneStatusEnum;
import com.hnac.hzims.safeproduct.mapper.HygienePlanMapper; import com.hnac.hzims.safeproduct.mapper.HygienePlanMapper;
import com.hnac.hzims.safeproduct.service.IHygienePlanService; import com.hnac.hzims.safeproduct.service.IHygienePlanService;
import com.hnac.hzims.safeproduct.service.IHygieneRecordService; import com.hnac.hzims.safeproduct.service.IHygieneRecordService;
@ -284,4 +285,16 @@ public class HygienePlanServiceImpl extends ServiceImpl<HygienePlanMapper, Hygie
} }
} }
} }
/**
* 查询时间范围内未开始的卫生自查计划数据
*/
@Override
public List<HygienePlanEntity> getWaitingHygienePlanInTimeRange(String startTime, String endTime) {
QueryWrapper<HygienePlanEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(HygienePlanEntity::getHygienePlanStatus, HygieneStatusEnum.WAITING.getValue())
.ge(HygienePlanEntity::getScheduledEndTime, startTime)
.le(HygienePlanEntity::getScheduledEndTime, endTime);
return this.list(queryWrapper);
}
} }

66
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java

@ -1,13 +1,7 @@
package com.hnac.hzims.safeproduct.service.impl; package com.hnac.hzims.safeproduct.service.impl;
import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.converters.longconverter.LongStringConverter;
import com.alibaba.excel.util.CollectionUtils; import com.alibaba.excel.util.CollectionUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.style.column.SimpleColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -17,7 +11,6 @@ import com.hnac.hzims.safeproduct.dto.HygieneRecordDTO;
import com.hnac.hzims.safeproduct.entity.HygienePlanEntity; import com.hnac.hzims.safeproduct.entity.HygienePlanEntity;
import com.hnac.hzims.safeproduct.entity.HygieneRecordEntity; import com.hnac.hzims.safeproduct.entity.HygieneRecordEntity;
import com.hnac.hzims.safeproduct.entity.HygieneZoneEntity; import com.hnac.hzims.safeproduct.entity.HygieneZoneEntity;
import com.hnac.hzims.safeproduct.entity.RehearsalPlanEntity;
import com.hnac.hzims.safeproduct.enums.RehearsalStatusEnum; import com.hnac.hzims.safeproduct.enums.RehearsalStatusEnum;
import com.hnac.hzims.safeproduct.mapper.HygienePlanMapper; import com.hnac.hzims.safeproduct.mapper.HygienePlanMapper;
import com.hnac.hzims.safeproduct.mapper.HygieneRecordMapper; import com.hnac.hzims.safeproduct.mapper.HygieneRecordMapper;
@ -27,18 +20,15 @@ import com.hnac.hzims.safeproduct.utils.BaseUtil;
import com.hnac.hzims.safeproduct.vo.HygieneRecordPageVO; import com.hnac.hzims.safeproduct.vo.HygieneRecordPageVO;
import com.hnac.hzims.safeproduct.vo.HygieneZoneDetailVO; import com.hnac.hzims.safeproduct.vo.HygieneZoneDetailVO;
import com.hnac.hzims.safeproduct.vo.HygieneRecordDetailVO; import com.hnac.hzims.safeproduct.vo.HygieneRecordDetailVO;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.ZoneId; import java.time.ZoneId;
import java.time.temporal.WeekFields; import java.time.temporal.WeekFields;
@ -60,6 +50,9 @@ public class HygieneRecordServiceImpl extends ServiceImpl<HygieneRecordMapper, H
@Autowired @Autowired
IHygieneZoneService hygieneZoneService; IHygieneZoneService hygieneZoneService;
@Value("${hzims.hygiene.savePath}")
private String savePath;
/** /**
* 删除关联卫生自查记录 * 删除关联卫生自查记录
*/ */
@ -170,50 +163,13 @@ public class HygieneRecordServiceImpl extends ServiceImpl<HygieneRecordMapper, H
* 卫生自查数据导出 * 卫生自查数据导出
*/ */
@Override @Override
public void exportHygieneData(Long hygieneRecordId, HttpServletResponse response) { public void exportHygieneRecordData(Long id, HttpServletResponse response) {
ServletOutputStream outputStream = null; HygieneRecordDetailVO hygieneRecordDetailVO = this.getRecordDetail(id);
try { Map<String, Object> params = BaseUtil.obj2Map(hygieneRecordDetailVO);
outputStream = response.getOutputStream(); String templateFile = "template/卫生自查记录表" + SafeProductConstant.DOCX_SUFFIX;
HygieneRecordDetailVO recordDetailVO = getRecordDetail(hygieneRecordId); String wordPath = savePath + "/卫生自查记录表" + SafeProductConstant.DOCX_SUFFIX;
List<HygieneZoneDetailVO> records = recordDetailVO.getCheckList(); String pdfPath = savePath + "/卫生自查记录表" + SafeProductConstant.PDF_SUFFIX;
// 设置响应头 BaseUtil.exportDocument(templateFile, params, wordPath, pdfPath, response);
// URLEncoder.encode防止中文乱码
String fileName = URLEncoder.encode("卫生自查记录数据表", "UTF-8");
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("UTF-8");
// ExcelWriter初始化
ExcelWriter excelWriter = EasyExcel
.write(response.getOutputStream())
.autoCloseStream(Boolean.TRUE)
.registerConverter(new LongStringConverter())
.registerWriteHandler(new SimpleColumnWidthStyleStrategy(25))
.build();
Date endTime = recordDetailVO.getActualEndTime();
String name = DateUtil.format(endTime, "yyyy年mm月") + "第" + recordDetailVO.getWeekNum() + "周卫生自查表";
List<String> head = new ArrayList<>();
head.add(name);
WriteSheet writeSheet = EasyExcel.writerSheet(1, "卫生自查记录数据表")
.head(Collections.singletonList(head))
.head(HygieneZoneDetailVO.class)
.build();
excelWriter.write(records, writeSheet);
excelWriter.finish();
} catch (Exception e) {
// 重置response
response.reset();
response.setContentType("application/json");
response.setCharacterEncoding("utf-8");
throw new ServiceException("卫生自查记录数据导出异常: " + e.getMessage());
} finally {
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
log.error("卫生自查记录数据导出输出流关闭异常: " + e.getMessage());
}
}
}
} }
/** /**

20
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java

@ -8,12 +8,13 @@ import com.hnac.hzims.common.logs.utils.StringUtils;
import com.hnac.hzims.safeproduct.constants.SafeProductConstant; import com.hnac.hzims.safeproduct.constants.SafeProductConstant;
import com.hnac.hzims.safeproduct.entity.RehearsalPlanEntity; import com.hnac.hzims.safeproduct.entity.RehearsalPlanEntity;
import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity; import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity;
import com.hnac.hzims.safeproduct.enums.RehearsalMethodEnum;
import com.hnac.hzims.safeproduct.enums.RehearsalStatusEnum; import com.hnac.hzims.safeproduct.enums.RehearsalStatusEnum;
import com.hnac.hzims.safeproduct.mapper.RehearsalPlanMapper; import com.hnac.hzims.safeproduct.mapper.RehearsalPlanMapper;
import com.hnac.hzims.safeproduct.mapper.RehearsalRecordMapper; import com.hnac.hzims.safeproduct.mapper.RehearsalRecordMapper;
import com.hnac.hzims.safeproduct.service.IRehearsalRecordService; import com.hnac.hzims.safeproduct.service.IRehearsalRecordService;
import com.hnac.hzims.safeproduct.utils.BaseUtil; import com.hnac.hzims.safeproduct.utils.BaseUtil;
import com.hnac.hzims.safeproduct.vo.RehearsalDetailVO; import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -129,9 +130,18 @@ public class RehearsalRecordServiceImpl extends ServiceImpl<RehearsalRecordMappe
* 演练记录表导出 * 演练记录表导出
*/ */
@Override @Override
public void exportRecordDetailData(Long id, HttpServletResponse response) { public void exportRehearsalRecordData(Long id, HttpServletResponse response) {
RehearsalDetailVO rehearsalDetailVO = this.getRecordDetailVOById(id); RehearsalRecordDetailVO rehearsalRecordDetailVO = this.getRecordDetailVOById(id);
Map<String, Object> params = BaseUtil.obj2Map(rehearsalDetailVO); // 演练方式字段
String rehearsalMethod = rehearsalRecordDetailVO.getRehearsalMethod();
if (rehearsalMethod.equals(RehearsalMethodEnum.MIXED.getValue())) {
rehearsalRecordDetailVO.setRehearsalMethod(RehearsalMethodEnum.MIXED.getDesc());
} else if (rehearsalMethod.equals(RehearsalMethodEnum.ONLINE.getValue())) {
rehearsalRecordDetailVO.setRehearsalMethod(RehearsalMethodEnum.ONLINE.getDesc());
} else {
rehearsalRecordDetailVO.setRehearsalMethod(RehearsalMethodEnum.OFFLINE.getDesc());
}
Map<String, Object> params = BaseUtil.obj2Map(rehearsalRecordDetailVO);
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;
@ -142,7 +152,7 @@ public class RehearsalRecordServiceImpl extends ServiceImpl<RehearsalRecordMappe
* 查询演练记录表详情 * 查询演练记录表详情
*/ */
@Override @Override
public RehearsalDetailVO getRecordDetailVOById(Long id) { public RehearsalRecordDetailVO getRecordDetailVOById(Long id) {
return baseMapper.getRecordDetailVOById(id); return baseMapper.getRecordDetailVOById(id);
} }
} }

90
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java

@ -1,35 +1,28 @@
package com.hnac.hzims.safeproduct.service.impl; package com.hnac.hzims.safeproduct.service.impl;
import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DatePattern;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.converters.longconverter.LongStringConverter;
import com.alibaba.excel.util.CollectionUtils; import com.alibaba.excel.util.CollectionUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.style.column.SimpleColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.safeproduct.constants.SafeProductConstant; import com.hnac.hzims.safeproduct.constants.SafeProductConstant;
import com.hnac.hzims.safeproduct.dto.TrainRecordDTO; import com.hnac.hzims.safeproduct.dto.TrainRecordDTO;
import com.hnac.hzims.safeproduct.entity.TrainPlanEntity; import com.hnac.hzims.safeproduct.entity.TrainPlanEntity;
import com.hnac.hzims.safeproduct.entity.TrainRecordEntity; import com.hnac.hzims.safeproduct.entity.TrainRecordEntity;
import com.hnac.hzims.safeproduct.enums.TrainMethodEnum;
import com.hnac.hzims.safeproduct.enums.TrainStatusEnum; import com.hnac.hzims.safeproduct.enums.TrainStatusEnum;
import com.hnac.hzims.safeproduct.mapper.TrainPlanMapper; import com.hnac.hzims.safeproduct.mapper.TrainPlanMapper;
import com.hnac.hzims.safeproduct.mapper.TrainRecordMapper; import com.hnac.hzims.safeproduct.mapper.TrainRecordMapper;
import com.hnac.hzims.safeproduct.service.ITestService; import com.hnac.hzims.safeproduct.service.ITestService;
import com.hnac.hzims.safeproduct.service.ITrainRecordService; import com.hnac.hzims.safeproduct.service.ITrainRecordService;
import com.hnac.hzims.safeproduct.utils.BaseUtil; import com.hnac.hzims.safeproduct.utils.BaseUtil;
import org.springblade.core.log.exception.ServiceException; import com.hnac.hzims.safeproduct.vo.TrainRecordDetailVO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -50,6 +43,9 @@ public class TrainRecordServiceImpl extends ServiceImpl<TrainRecordMapper, Train
@Resource @Resource
TrainPlanMapper trainPlanMapper; TrainPlanMapper trainPlanMapper;
@Value("${hzims.train.savePath}")
private String savePath;
/** /**
* 新增培训记录 * 新增培训记录
*/ */
@ -138,44 +134,30 @@ public class TrainRecordServiceImpl extends ServiceImpl<TrainRecordMapper, Train
* 培训记录数据导出 * 培训记录数据导出
*/ */
@Override @Override
public void exportTrainRecordData(Map<String, Object> param, HttpServletResponse response) { public void exportTrainRecordData(Long id, HttpServletResponse response) {
ServletOutputStream outputStream = null; TrainRecordDetailVO trainRecordDetailVO = this.getTrainRecordDetailById(id);
try { // 培训方式字段
outputStream = response.getOutputStream(); String trainMethod = trainRecordDetailVO.getTrainMethod();
String trainPlanId = String.valueOf(param.get("trainPlanId")); if (trainMethod.equals(TrainMethodEnum.MIXED.getValue())) {
List<TrainRecordEntity> trainRecordList = getTrainRecordByTrainPlanId(trainPlanId); trainRecordDetailVO.setTrainMethod(TrainMethodEnum.MIXED.getDesc());
// 设置响应头 } else if (trainMethod.equals(TrainMethodEnum.ONLINE.getValue())) {
// URLEncoder.encode防止中文乱码 trainRecordDetailVO.setTrainMethod(TrainMethodEnum.ONLINE.getDesc());
String fileName = URLEncoder.encode("培训记录表", "UTF-8"); } else {
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); trainRecordDetailVO.setTrainMethod(TrainMethodEnum.OFFLINE.getDesc());
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("UTF-8");
// ExcelWriter初始化
ExcelWriter excelWriter = EasyExcel
.write(response.getOutputStream())
.autoCloseStream(Boolean.TRUE)
.registerConverter(new LongStringConverter())
.registerWriteHandler(new SimpleColumnWidthStyleStrategy(25))
.build();
WriteSheet writeSheet = EasyExcel.writerSheet(1, "培训记录表").head(TrainRecordEntity.class)
.build();
excelWriter.write(trainRecordList, writeSheet);
excelWriter.finish();
} catch (Exception e) {
// 重置response
response.reset();
response.setContentType("application/json");
response.setCharacterEncoding("utf-8");
throw new ServiceException("培训记录数据导出异常: " + e.getMessage());
} finally {
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
log.error("培训记录导出响应头输出流关闭异常: " + e.getMessage());
}
}
} }
Map<String, Object> params = BaseUtil.obj2Map(trainRecordDetailVO);
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);
}
/**
* 查询培训记录表详情
*/
@Override
public TrainRecordDetailVO getTrainRecordDetailById(Long id) {
return baseMapper.getTrainRecordDetailById(id);
} }
/** /**
@ -202,18 +184,4 @@ public class TrainRecordServiceImpl extends ServiceImpl<TrainRecordMapper, Train
.orderByDesc(TrainRecordEntity::getCode); .orderByDesc(TrainRecordEntity::getCode);
return this.list(queryWrapper); return this.list(queryWrapper);
} }
/**
* 根据培训计划id查询培训记录数据
* @param trainPlanId 培训计划id
* @return 培训记录列表
*/
public List<TrainRecordEntity> getTrainRecordByTrainPlanId(String trainPlanId) {
LambdaQueryWrapper<TrainRecordEntity> queryWrapper = new LambdaQueryWrapper<>();
if (!trainPlanId.equals("null")) {
queryWrapper.ge(TrainRecordEntity::getTrainPlanId, trainPlanId);
}
queryWrapper.orderByDesc(TrainRecordEntity::getCreateTime);
return this.list(queryWrapper);
}
} }

341
hzims-service/safeproduct/src/main/resources/db/1.0.1.sql

@ -10,344 +10,3 @@ create table document_management
is_deleted tinyint default 0 comment '逻辑删除' is_deleted tinyint default 0 comment '逻辑删除'
) comment '文档管理'; ) comment '文档管理';
CREATE TABLE `hzims_rehearsal_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`subject` varchar(50) NOT NULL COMMENT '演练科目',
`scheduled_start_time` date NOT NULL COMMENT '演练计划开始时间',
`scheduled_end_time` date NOT NULL COMMENT '演练计划结束时间',
`location` varchar(255) NOT NULL COMMENT '演练地点',
`commander` varchar(10) NOT NULL COMMENT '总指挥',
`rehearsal_method` varchar(20) DEFAULT '' COMMENT '演练方式',
`rehearsal_status` varchar(20) NOT NULL DEFAULT 'WAITING' COMMENT '演练状态',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_rehearsal_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`rehearsal_plan_id` bigint(20) NOT NULL COMMENT '演练计划id',
`code` varchar(50) NOT NULL COMMENT '编号',
`people_num` int(10) NOT NULL DEFAULT '0' COMMENT '参演人数',
`people_name` varchar(5000) DEFAULT '' COMMENT '参演人员',
`actual_start_time` datetime NOT NULL COMMENT '演练实际开始时间',
`actual_end_time` datetime NOT NULL COMMENT '演练实际结束时间',
`record` varchar(250) NOT NULL DEFAULT '' COMMENT '演练记录',
`comment` varchar(250) NOT NULL DEFAULT '' 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_train_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`scheduled_start_time` date NOT NULL COMMENT '计划培训开始时间',
`scheduled_end_time` date NOT NULL COMMENT '计划培训结束时间',
`lesson` varchar(255) NOT NULL COMMENT '培训课程',
`location` varchar(255) NOT NULL COMMENT '培训地点',
`train_method` varchar(20) DEFAULT '' COMMENT '培训方式',
`teacher` varchar(20) NOT NULL DEFAULT '' COMMENT '培训讲师',
`train_status` varchar(20) NOT NULL DEFAULT 'WAITING' COMMENT '培训状态',
`is_test` int(2) NOT NULL DEFAULT '0' COMMENT '关联考试:0-否,1-是',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_train_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`train_plan_id` bigint(20) DEFAULT NULL COMMENT '培训计划id',
`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 '培训内容',
`actual_start_time` datetime DEFAULT NULL COMMENT '实际培训开始时间',
`actual_end_time` datetime DEFAULT NULL COMMENT '实际培训结束时间',
`command` varchar(250) DEFAULT NULL 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_test` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`train_plan_id` bigint(20) DEFAULT NULL COMMENT '培训计划id',
`train_record_id` bigint(20) DEFAULT NULL COMMENT '培训记录id',
`test_name` varchar(50) NOT NULL DEFAULT '' COMMENT '考试记录名称',
`code` varchar(50) NOT NULL COMMENT '编号',
`unit` varchar(50) NOT NULL COMMENT '单位',
`test_start_time` datetime NOT NULL COMMENT '考试开始时间',
`test_end_time` datetime NOT NULL COMMENT '考试结束时间',
`location` varchar(255) NOT NULL COMMENT '考试地点',
`subject` varchar(50) NOT NULL COMMENT '考试科目',
`proctor` varchar(20) NOT NULL COMMENT '监考人',
`people_name` varchar(1000) DEFAULT '' 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_test_score` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`test_id` bigint(20) DEFAULT NULL COMMENT '考试记录id',
`name` varchar(50) NOT NULL COMMENT '姓名',
`score` int(10) DEFAULT NULL COMMENT '成绩',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_conference_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`theme` varchar(50) NOT NULL COMMENT '会议主题',
`scheduled_start_time` date NOT NULL COMMENT '会议计划开始时间',
`scheduled_end_time` date NOT NULL COMMENT '会议计划结束时间',
`location` varchar(255) NOT NULL COMMENT '会议地点',
`host` varchar(10) NOT NULL COMMENT '主持人',
`conference_method` varchar(20) DEFAULT '' COMMENT '会议方式',
`conference_status` varchar(20) NOT NULL DEFAULT 'WAITING' COMMENT '会议状态',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_conference_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`conference_plan_id` bigint(20) NOT NULL COMMENT '会议计划id',
`code` varchar(50) NOT NULL COMMENT '编号',
`people_name` varchar(5000) DEFAULT '' COMMENT '参会人员',
`actual_start_time` datetime DEFAULT NULL COMMENT '会议实际开始时间',
`actual_end_time` datetime DEFAULT NULL COMMENT '会议实际结束时间',
`recorder` varchar(20) DEFAULT '' COMMENT '记录人',
`content` mediumtext DEFAULT '' DEFAULT '' 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_hygiene_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`code` 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 '计划结束时间',
`hygiene_plan_status` varchar(50) NOT NULL DEFAULT 'WAITING' COMMENT '自查计划状态',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_hygiene_zone` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`hygiene_plan_id` bigint(20) NOT NULL COMMENT '卫生自查计划id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`zone` varchar(50) NOT NULL COMMENT '责任区',
`principal` varchar(20) NOT NULL COMMENT '责任人',
`check_item` mediumtext NOT NULL COMMENT '检查项',
`check_item_score` varchar(255) NOT NULL COMMENT '检查项分值',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_hygiene_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`hygiene_plan_id` bigint(20) NOT NULL COMMENT '卫生自查计划id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`code` varchar(50) NOT NULL COMMENT '编号',
`actual_start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '实际开始时间',
`actual_end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '实际结束时间',
`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 '综合评分',
`week_num` int(10) NOT NULL COMMENT '周数',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '检查图片',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_car` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`car_brand` varchar(50) NOT NULL COMMENT '品牌',
`car_type` varchar(50) NOT NULL COMMENT '型号',
`plate_number` varchar(50) NOT NULL COMMENT '车牌号',
`registration_time` date NOT NULL COMMENT '上牌时间',
`insurance_pay_last_time` date NOT NULL COMMENT '上期缴车保时间',
`insurance_pay_next_time` date NOT NULL COMMENT '下期缴车保时间',
`annual_inspection_time` date NOT NULL COMMENT '年检时间',
`annual_inspection_status` varchar(50) NOT NULL COMMENT '年检状态',
`insurance_status` varchar(50) NOT NULL COMMENT '保险状态',
`maintenance_last_time` date DEFAULT NULL COMMENT '上期保养时间',
`maintenance_next_time` date DEFAULT NULL COMMENT '下期保养时间',
`maintenance_mileage` decimal(10, 2) DEFAULT NULL COMMENT '保养里程',
`maintenance_status` varchar(50) DEFAULT NULL COMMENT '保养状态',
`manager` varchar(50) NOT NULL 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_car_maintenance` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_id` bigint(20) NOT NULL COMMENT '车辆id',
`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 '维保结束时间',
`location` varchar(255) NOT NULL COMMENT '维保地点',
`cost` bigint(20) NOT NULL COMMENT '维保费用',
`maintainer` varchar(20) NOT NULL COMMENT '维保人',
`manager_advice` varchar(500) DEFAULT NULL COMMENT '车辆管理人意见',
`maintenance_status` varchar(50) DEFAULT NULL COMMENT '维保状态',
`confirmation_time` datetime DEFAULT NULL 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_car_used_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_id` bigint(20) NOT NULL COMMENT '车辆id',
`code` varchar(50) NOT NULL COMMENT '编号',
`unit` varchar(50) NOT NULL COMMENT '用车单位',
`used_location` varchar(255) NOT NULL COMMENT '使用地点',
`user` varchar(20) NOT NULL COMMENT '使用人',
`remark` mediumtext DEFAULT NULL COMMENT '使用详情',
`start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '使用时间',
`end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '收车时间',
`start_miles` decimal(10, 2) NOT NULL COMMENT '出车公里数',
`end_miles` decimal(10, 2) NOT NULL COMMENT '收车公里数',
`miles` decimal(10, 2) NOT NULL COMMENT '行驶公里数',
`used_status` varchar(50) DEFAULT NULL COMMENT '用车状态',
`confirmation_time` datetime DEFAULT NULL COMMENT '确认时间',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '里程图片',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_car_check_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_id` bigint(20) NOT NULL COMMENT '车辆id',
`code` varchar(50) NOT NULL COMMENT '编号',
`checker` varchar(50) NOT NULL COMMENT '检查人',
`check_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '检查时间',
`conclusion` mediumtext NOT NULL COMMENT '检查结论',
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '填报备注',
`confirmation_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '确认时间',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '里程图片',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_car_check_item` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_check_record_id` bigint(20) NOT NULL COMMENT '车检记录id',
`check_item` varchar(500) NOT NULL COMMENT '检查项目',
`check_content` mediumtext NOT NULL COMMENT '检查内容',
`check_result` mediumtext NOT NULL COMMENT '检查结果',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;

338
hzims-service/safeproduct/src/main/resources/db/1.0.2.sql

@ -1 +1,339 @@
alter table `hzims_safe_safety_tool` add column `advance_notice_days` tinyint(4) default 0 comment '安全工器具提前通知天数'; alter table `hzims_safe_safety_tool` add column `advance_notice_days` tinyint(4) default 0 comment '安全工器具提前通知天数';
CREATE TABLE `hzims_rehearsal_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`subject` varchar(50) NOT NULL COMMENT '演练科目',
`scheduled_start_time` date NOT NULL COMMENT '演练计划开始时间',
`scheduled_end_time` date NOT NULL COMMENT '演练计划结束时间',
`location` varchar(255) NOT NULL COMMENT '演练地点',
`commander` varchar(10) NOT NULL COMMENT '总指挥',
`rehearsal_method` varchar(20) DEFAULT '' COMMENT '演练方式',
`rehearsal_status` varchar(20) NOT NULL DEFAULT 'WAITING' COMMENT '演练状态',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_rehearsal_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`rehearsal_plan_id` bigint(20) NOT NULL COMMENT '演练计划id',
`code` varchar(50) NOT NULL COMMENT '编号',
`people_num` int(10) NOT NULL DEFAULT '0' COMMENT '参演人数',
`people_name` varchar(5000) DEFAULT '' COMMENT '参演人员',
`actual_start_time` datetime NOT NULL COMMENT '演练实际开始时间',
`actual_end_time` datetime NOT NULL COMMENT '演练实际结束时间',
`record` varchar(250) NOT NULL DEFAULT '' COMMENT '演练记录',
`comment` varchar(250) NOT NULL DEFAULT '' 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_train_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`scheduled_start_time` date NOT NULL COMMENT '计划培训开始时间',
`scheduled_end_time` date NOT NULL COMMENT '计划培训结束时间',
`lesson` varchar(255) NOT NULL COMMENT '培训课程',
`location` varchar(255) NOT NULL COMMENT '培训地点',
`train_method` varchar(20) DEFAULT '' COMMENT '培训方式',
`teacher` varchar(20) NOT NULL DEFAULT '' COMMENT '培训讲师',
`train_status` varchar(20) NOT NULL DEFAULT 'WAITING' COMMENT '培训状态',
`is_test` int(2) NOT NULL DEFAULT '0' COMMENT '关联考试:0-否,1-是',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_train_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`train_plan_id` bigint(20) DEFAULT NULL COMMENT '培训计划id',
`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 '培训内容',
`actual_start_time` datetime DEFAULT NULL COMMENT '实际培训开始时间',
`actual_end_time` datetime DEFAULT NULL COMMENT '实际培训结束时间',
`command` varchar(250) DEFAULT NULL 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_test` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`train_plan_id` bigint(20) DEFAULT NULL COMMENT '培训计划id',
`train_record_id` bigint(20) DEFAULT NULL COMMENT '培训记录id',
`test_name` varchar(50) NOT NULL DEFAULT '' COMMENT '考试记录名称',
`code` varchar(50) NOT NULL COMMENT '编号',
`unit` varchar(50) NOT NULL COMMENT '单位',
`test_start_time` datetime NOT NULL COMMENT '考试开始时间',
`test_end_time` datetime NOT NULL COMMENT '考试结束时间',
`location` varchar(255) NOT NULL COMMENT '考试地点',
`subject` varchar(50) NOT NULL COMMENT '考试科目',
`proctor` varchar(20) NOT NULL COMMENT '监考人',
`people_name` varchar(1000) DEFAULT '' 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_test_score` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`test_id` bigint(20) DEFAULT NULL COMMENT '考试记录id',
`name` varchar(50) NOT NULL COMMENT '姓名',
`score` int(10) DEFAULT NULL COMMENT '成绩',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_conference_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`theme` varchar(50) NOT NULL COMMENT '会议主题',
`scheduled_start_time` date NOT NULL COMMENT '会议计划开始时间',
`scheduled_end_time` date NOT NULL COMMENT '会议计划结束时间',
`location` varchar(255) NOT NULL COMMENT '会议地点',
`host` varchar(10) NOT NULL COMMENT '主持人',
`conference_method` varchar(20) DEFAULT '' COMMENT '会议方式',
`conference_status` varchar(20) NOT NULL DEFAULT 'WAITING' COMMENT '会议状态',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_conference_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`conference_plan_id` bigint(20) NOT NULL COMMENT '会议计划id',
`code` varchar(50) NOT NULL COMMENT '编号',
`people_name` varchar(5000) DEFAULT '' COMMENT '参会人员',
`actual_start_time` datetime DEFAULT NULL COMMENT '会议实际开始时间',
`actual_end_time` datetime DEFAULT NULL COMMENT '会议实际结束时间',
`recorder` varchar(20) DEFAULT '' COMMENT '记录人',
`content` mediumtext DEFAULT '' DEFAULT '' 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_hygiene_plan` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`code` 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 '计划结束时间',
`hygiene_plan_status` varchar(50) NOT NULL DEFAULT 'WAITING' COMMENT '自查计划状态',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_hygiene_zone` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`hygiene_plan_id` bigint(20) NOT NULL COMMENT '卫生自查计划id',
`zone` varchar(50) NOT NULL COMMENT '责任区',
`principal` varchar(20) NOT NULL COMMENT '责任人',
`check_item` mediumtext NOT NULL COMMENT '检查项',
`check_item_score` varchar(255) NOT NULL COMMENT '检查项分值',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_hygiene_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`hygiene_plan_id` bigint(20) NOT NULL COMMENT '卫生自查计划id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`code` varchar(50) NOT NULL COMMENT '编号',
`actual_start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '实际开始时间',
`actual_end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '实际结束时间',
`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 '综合评分',
`week_num` int(10) NOT NULL COMMENT '周数',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '检查图片',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_car` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`unit` varchar(50) NOT NULL COMMENT '单位',
`car_brand` varchar(50) NOT NULL COMMENT '品牌',
`car_type` varchar(50) NOT NULL COMMENT '型号',
`plate_number` varchar(50) NOT NULL COMMENT '车牌号',
`registration_time` date NOT NULL COMMENT '上牌时间',
`insurance_pay_last_time` date NOT NULL COMMENT '上期缴车保时间',
`insurance_pay_next_time` date NOT NULL COMMENT '下期缴车保时间',
`annual_inspection_time` date NOT NULL COMMENT '年检时间',
`annual_inspection_status` varchar(50) NOT NULL COMMENT '年检状态',
`insurance_status` varchar(50) NOT NULL COMMENT '保险状态',
`maintenance_last_time` date DEFAULT NULL COMMENT '上期保养时间',
`maintenance_next_time` date DEFAULT NULL COMMENT '下期保养时间',
`maintenance_mileage` decimal(10, 2) DEFAULT NULL COMMENT '保养里程',
`maintenance_status` varchar(50) DEFAULT NULL COMMENT '保养状态',
`manager` varchar(50) NOT NULL 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_car_maintenance` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_id` bigint(20) NOT NULL COMMENT '车辆id',
`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 '维保结束时间',
`location` varchar(255) NOT NULL COMMENT '维保地点',
`cost` bigint(20) NOT NULL COMMENT '维保费用',
`maintainer` varchar(20) NOT NULL COMMENT '维保人',
`manager_advice` varchar(500) DEFAULT NULL COMMENT '车辆管理人意见',
`maintenance_status` varchar(50) DEFAULT NULL COMMENT '维保状态',
`confirmation_time` datetime DEFAULT NULL 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 '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_car_used_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_id` bigint(20) NOT NULL COMMENT '车辆id',
`code` varchar(50) NOT NULL COMMENT '编号',
`unit` varchar(50) NOT NULL COMMENT '用车单位',
`used_location` varchar(255) NOT NULL COMMENT '使用地点',
`user` varchar(20) NOT NULL COMMENT '使用人',
`remark` mediumtext DEFAULT NULL COMMENT '使用详情',
`start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '使用时间',
`end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '收车时间',
`start_miles` decimal(10, 2) NOT NULL COMMENT '出车公里数',
`end_miles` decimal(10, 2) NOT NULL COMMENT '收车公里数',
`miles` decimal(10, 2) NOT NULL COMMENT '行驶公里数',
`used_status` varchar(50) DEFAULT NULL COMMENT '用车状态',
`confirmation_time` datetime DEFAULT NULL COMMENT '确认时间',
`img_path` varchar(1000) NOT NULL DEFAULT '' COMMENT '里程图片',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_car_check_record` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_id` bigint(20) NOT NULL COMMENT '车辆id',
`code` varchar(50) NOT NULL COMMENT '编号',
`checker` varchar(50) NOT NULL COMMENT '检查人',
`check_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '检查时间',
`conclusion` mediumtext NOT NULL COMMENT '检查结论',
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '填报备注',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;
CREATE TABLE `hzims_car_check_item` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`car_check_record_id` bigint(20) NOT NULL COMMENT '车检记录id',
`check_item` varchar(500) NOT NULL COMMENT '检查项目',
`check_content` mediumtext NOT NULL COMMENT '检查内容',
`check_result` mediumtext NOT NULL COMMENT '检查结果',
`create_user` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建人',
`create_dept` bigint(20) NOT NULL DEFAULT '-1' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` bigint(20) DEFAULT '-1' COMMENT '更新人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`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;

BIN
hzims-service/safeproduct/src/main/resources/template/会议记录表.docx

Binary file not shown.

BIN
hzims-service/safeproduct/src/main/resources/template/卫生自查表.docx

Binary file not shown.

BIN
hzims-service/safeproduct/src/main/resources/template/培训记录表.docx

Binary file not shown.

BIN
hzims-service/safeproduct/src/main/resources/template/演练记录表.docx

Binary file not shown.

BIN
hzims-service/safeproduct/src/main/resources/template/用车记录单.docx

Binary file not shown.

BIN
hzims-service/safeproduct/src/main/resources/template/车辆检查表.docx

Binary file not shown.

BIN
hzims-service/safeproduct/src/main/resources/template/车辆维保记录单.docx

Binary file not shown.
Loading…
Cancel
Save