diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/ConferenceExportDTO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/ConferenceExportDTO.java
index 3f3e951..6107a4d 100644
--- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/ConferenceExportDTO.java
+++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/ConferenceExportDTO.java
@@ -45,14 +45,6 @@ public class ConferenceExportDTO {
@ExcelProperty(value = "主持人", index = 6)
private String host;
- @ApiModelProperty("会议实际开始时间")
- @ExcelProperty(value = "会议实际开始时间", index = 7)
- private Date actualStartTime;
-
- @ApiModelProperty("会议实际结束时间")
- @ExcelProperty(value = "会议实际结束时间", index = 8)
- private Date actualEndTime;
-
@ApiModelProperty("会议状态")
@ExcelProperty(value = "会议状态", index = 9)
private String conferenceStatus;
diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/HygienePlanDTO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/HygienePlanDTO.java
index d4c074f..0345876 100644
--- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/HygienePlanDTO.java
+++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/HygienePlanDTO.java
@@ -24,6 +24,9 @@ public class HygienePlanDTO extends BaseEntity {
@ApiModelProperty("卫生自查计划id")
private Long id;
+ @ApiModelProperty("单位")
+ private String unit;
+
@ApiModelProperty("计划名称")
private String name;
diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/RehearsalExportDTO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/RehearsalExportDTO.java
index 800f911..df269e3 100644
--- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/RehearsalExportDTO.java
+++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/RehearsalExportDTO.java
@@ -37,19 +37,7 @@ public class RehearsalExportDTO {
@ExcelProperty(value = "演练地点", index = 4)
private String location;
- @ApiModelProperty("参演人数")
- @ExcelProperty(value = "参演人数", index = 5)
- private Integer peopleNum;
-
- @ApiModelProperty("演练实际开始时间")
- @ExcelProperty(value = "演练实际开始时间", index = 6)
- private Date actualStartTime;
-
- @ApiModelProperty("演练实际结束时间")
- @ExcelProperty(value = "演练实际结束时间", index = 7)
- private Date actualEndTime;
-
@ApiModelProperty("演练状态")
- @ExcelProperty(value = "演练状态", index = 8)
+ @ExcelProperty(value = "演练状态", index = 5)
private String rehearsalStatus;
}
diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java
index f4af9aa..39a641f 100644
--- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java
+++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java
@@ -24,6 +24,9 @@ public class HygienePlanEntity extends BaseEntity {
@ApiModelProperty("计划名称")
private String name;
+ @ApiModelProperty("单位")
+ private String unit;
+
@ApiModelProperty("标准总分值")
private Integer standardScore;
diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygieneRecordEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygieneRecordEntity.java
index 275d3dd..e58f745 100644
--- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygieneRecordEntity.java
+++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygieneRecordEntity.java
@@ -59,7 +59,4 @@ public class HygieneRecordEntity extends BaseEntity {
@Size(max = 1000, message = "检查图片字段长度不能超过1000")
@ApiModelProperty("检查图片")
private String imgPath;
-
- @ApiModelProperty("自查记录状态")
- private String hygieneRecordStatus;
}
diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/HygienePlanDetailVO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/HygienePlanDetailVO.java
index a41e72e..f342328 100644
--- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/HygienePlanDetailVO.java
+++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/HygienePlanDetailVO.java
@@ -21,6 +21,12 @@ import java.util.List;
@ApiModel(value = "卫生自查计划详情VO类")
public class HygienePlanDetailVO extends BaseEntity {
+ @ApiModelProperty("计划名称")
+ private String name;
+
+ @ApiModelProperty("单位")
+ private String unit;
+
@ApiModelProperty("标准总分值")
private Integer standardScore;
diff --git a/hzims-service/safeproduct/pom.xml b/hzims-service/safeproduct/pom.xml
index a048dd1..cfede4f 100644
--- a/hzims-service/safeproduct/pom.xml
+++ b/hzims-service/safeproduct/pom.xml
@@ -160,6 +160,14 @@
false
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ true
+
+
diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java
index 20ce27e..88779d5 100644
--- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java
+++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java
@@ -120,7 +120,6 @@ public class CarController extends BladeController {
@GetMapping("/carMaintenancePage")
@ApiImplicitParams({
- @ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "startTime", value = "开始时间", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "endTime", value = "结束时间", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "carId", value = "车辆id", dataType = "query", paramType = "string")
@@ -169,7 +168,6 @@ public class CarController extends BladeController {
@GetMapping("/carUsedRecordPage")
@ApiImplicitParams({
- @ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "carId", value = "车辆id", dataType = "query", paramType = "string")
})
@ApiOperation(value = "用车记录分页")
@@ -244,14 +242,14 @@ public class CarController extends BladeController {
@GetMapping("/exportCarUsedRecordData")
@ApiOperation(value = "导出用车记录单")
@ApiOperationSupport(order = 25)
- public void exportCarUsedRecordData() {
-
+ public void exportCarUsedRecordData(@RequestParam Long id, HttpServletResponse response) {
+ carUsedRecordService.exportCarUsedRecordData(id, response);
}
@GetMapping("/exportCarCheckRecordData")
@ApiOperation(value = "导出车检记录单")
@ApiOperationSupport(order = 26)
- public void exportCarCheckRecordData() {
-
+ public void exportCarCheckRecordData(@RequestParam Long id, HttpServletResponse response) {
+ carCheckRecordService.exportCarCheckRecordData(id, response);
}
}
diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java
index e0e36e9..63bdafe 100644
--- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java
+++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java
@@ -72,6 +72,8 @@ public class HygieneController extends BladeController {
@GetMapping("/planPage")
@ApiImplicitParams({
+ @ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"),
+ @ApiImplicitParam(name = "name", value = "名称", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "scheduledStartTime", value = "计划开始时间", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "scheduledEndTime", value = "计划结束时间", dataType = "query", paramType = "string")
})
diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/jobs/CarJob.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/jobs/CarJob.java
index 86c7e55..93132b0 100644
--- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/jobs/CarJob.java
+++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/jobs/CarJob.java
@@ -1,12 +1,18 @@
package com.hnac.hzims.safeproduct.jobs;
+import com.alibaba.excel.util.CollectionUtils;
import com.hnac.hzims.safeproduct.entity.CarEntity;
+import com.hnac.hzims.safeproduct.entity.CarMaintenanceEntity;
+import com.hnac.hzims.safeproduct.enums.CarInsuranceStatusEnum;
+import com.hnac.hzims.safeproduct.enums.CarMaintenanceStatusEnum;
+import com.hnac.hzims.safeproduct.service.ICarMaintenanceService;
import com.hnac.hzims.safeproduct.service.ICarService;
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 org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
@@ -23,9 +29,13 @@ public class CarJob {
@Autowired
ICarService carService;
+ @Autowired
+ ICarMaintenanceService carMaintenanceService;
+
/**
* 车辆台账自动变更
*/
+ @Transactional(rollbackFor = Exception.class)
@XxlJob("autoChangeCarStatus")
public ReturnT autoChangeCarStatus(String param) {
// 获取时间范围
@@ -33,9 +43,26 @@ public class CarJob {
Date before = DateUtil.minusDays(current, 1);
String today = DateUtil.format(current, "yyyy-mm-dd");
String yesterday = DateUtil.format(before, "yyyy-mm-dd");
+ // 车包状态变更
List uninsuredCarList = carService.getCarListByInsuranceTime(today, yesterday);
-// uninsuredCarList.forEach(car -> car.setInsuranceStatus());
-// List carListByMaintenanceTime = carService.getCarListByMaintenanceTime(today, yesterday);
- return ReturnT.SUCCESS;
+ uninsuredCarList.forEach(car -> car.setInsuranceStatus(CarInsuranceStatusEnum.UNINSURED.getValue()));
+ boolean insuranceUpdate = carService.updateBatchById(uninsuredCarList);
+ if (!insuranceUpdate) {
+ return ReturnT.FAIL;
+ }
+ // 维保状态变更
+ List unMaintainedCarList = carService.getCarListByMaintenanceTime(today, yesterday);
+ unMaintainedCarList.forEach(car -> {
+ // 查询车辆在两次维保时间内是否有确认过的维保记录
+ String lastMaintenanceTime = DateUtil.format(car.getMaintenanceLastTime(), "yyyy-mm-dd");
+ String nextMaintenanceTime = DateUtil.format(car.getMaintenanceNextTime(), "yyyy-mm-dd");
+ List carMaintenanceList = carMaintenanceService.getCarMaintenanceByCarIdAndTime(car.getId(),
+ lastMaintenanceTime, nextMaintenanceTime);
+ // 若无维保记录,说明在规定范围内未进行有效维保
+ if (CollectionUtils.isEmpty(carMaintenanceList)) {
+ car.setMaintenanceStatus(CarMaintenanceStatusEnum.UNMAINTAINED.getValue());
+ }
+ });
+ return carService.updateBatchById(unMaintainedCarList) ? ReturnT.SUCCESS : ReturnT.FAIL;
}
}
diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml
index 0122ec9..695be59 100644
--- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml
+++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml
@@ -44,7 +44,7 @@
\ No newline at end of file
diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.xml
index b6cd857..8b5f204 100644
--- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.xml
+++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.xml
@@ -3,23 +3,21 @@
\ No newline at end of file
diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygienePlanMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygienePlanMapper.xml
index ce87bbb..39919c0 100644
--- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygienePlanMapper.xml
+++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygienePlanMapper.xml
@@ -20,9 +20,9 @@