Browse Source

fix: 会议、卫生、车辆管理模块bug处理

zhongwei
liwen 10 months ago
parent
commit
60abe7113d
  1. 30
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/enums/CarMaintenanceTypeEnum.java
  2. 3
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/CarMaintenanceDetailVO.java
  3. 3
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java
  4. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml
  5. 8
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarMaintenanceServiceImpl.java
  6. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java
  7. BIN
      hzims-service/safeproduct/src/main/resources/template/会议记录表.docx
  8. BIN
      hzims-service/safeproduct/src/main/resources/template/培训记录表.docx
  9. BIN
      hzims-service/safeproduct/src/main/resources/template/演练记录表.docx

30
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/enums/CarMaintenanceTypeEnum.java

@ -0,0 +1,30 @@
package com.hnac.hzims.safeproduct.enums;
/**
* 车辆维保类型枚举类
*
* @author liwen
* @date 2024-01-16
*/
public enum CarMaintenanceTypeEnum {
MAINTAIN("MAINTAIN", "保养"),
REPAIR("REPAIR", "维修");
private final String value;
private final String desc;
CarMaintenanceTypeEnum(String value, String desc) {
this.value = value;
this.desc = desc;
}
public String getValue() {
return value;
}
public String getDesc() {
return desc;
}
}

3
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/CarMaintenanceDetailVO.java

@ -58,4 +58,7 @@ public class CarMaintenanceDetailVO {
@ApiModelProperty("车牌号")
private String plateNumber;
@ApiModelProperty("维保类型")
private String maintenanceType;
}

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

@ -14,6 +14,9 @@ import java.util.Date;
@ApiModel(value = "会议记录表VO类")
public class ConferenceRecordDetailVO {
@ApiModelProperty("编码")
private String code;
@ApiModelProperty("会议实际开始时间")
private Date actualStartTime;

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

@ -5,7 +5,7 @@
<select id="getCarMaintenance" resultType="com.hnac.hzims.safeproduct.vo.CarMaintenanceDetailVO">
SELECT
t1.code, t1.start_time, t1.end_time, t1.location, t1.cost, t1.maintainer, t1.content, t1.img_path, t1.file_path,
t1.manager_advice, t1.confirmation_time, t2.plate_number, t2.unit, t2.car_brand, t2.car_type
t1.manager_advice, t1.confirmation_time, t2.plate_number, t2.unit, t2.car_brand, t2.car_type, t1.maintanence_type
FROM
hzims_car_maintenance t1
LEFT JOIN hzims_car t2 ON t1.car_id = t2.id

8
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/CarMaintenanceServiceImpl.java

@ -11,6 +11,7 @@ import com.hnac.hzims.safeproduct.dto.CarMaintenanceConfirmationDTO;
import com.hnac.hzims.safeproduct.entity.CarEntity;
import com.hnac.hzims.safeproduct.entity.CarMaintenanceEntity;
import com.hnac.hzims.safeproduct.enums.CarMaintenanceStatusEnum;
import com.hnac.hzims.safeproduct.enums.CarMaintenanceTypeEnum;
import com.hnac.hzims.safeproduct.mapper.CarMaintenanceMapper;
import com.hnac.hzims.safeproduct.service.ICarMaintenanceService;
import com.hnac.hzims.safeproduct.service.ICarService;
@ -113,6 +114,13 @@ public class CarMaintenanceServiceImpl extends ServiceImpl<CarMaintenanceMapper,
@Override
public void exportCarMaintenanceData(Long id, HttpServletResponse response) {
CarMaintenanceDetailVO carMaintenanceDetailVO = this.getCarMaintenance(id);
// 维保类型
String maintenanceType = carMaintenanceDetailVO.getMaintenanceType();
if (maintenanceType.equals(CarMaintenanceTypeEnum.MAINTAIN.getValue())) {
carMaintenanceDetailVO.setMaintenanceType(CarMaintenanceTypeEnum.MAINTAIN.getDesc());
} else {
carMaintenanceDetailVO.setMaintenanceType(CarMaintenanceTypeEnum.REPAIR.getDesc());
}
Map<String, Object> params = BaseUtil.obj2Map(carMaintenanceDetailVO);
String templateFile = "template/车辆维保记录单" + SafeProductConstant.DOCX_SUFFIX;
String wordPath = savePath + "/车辆维保记录单" + SafeProductConstant.DOCX_SUFFIX;

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

@ -166,9 +166,9 @@ public class HygieneRecordServiceImpl extends ServiceImpl<HygieneRecordMapper, H
public void exportHygieneRecordData(Long id, HttpServletResponse response) {
HygieneRecordDetailVO hygieneRecordDetailVO = this.getRecordDetail(id);
Map<String, Object> params = BaseUtil.obj2Map(hygieneRecordDetailVO);
String templateFile = "template/卫生自查记录表" + SafeProductConstant.DOCX_SUFFIX;
String wordPath = savePath + "/卫生自查记录表" + SafeProductConstant.DOCX_SUFFIX;
String pdfPath = savePath + "/卫生自查记录表" + SafeProductConstant.PDF_SUFFIX;
String templateFile = "template/卫生自查表" + SafeProductConstant.DOCX_SUFFIX;
String wordPath = savePath + "/卫生自查表" + SafeProductConstant.DOCX_SUFFIX;
String pdfPath = savePath + "/卫生自查表" + SafeProductConstant.PDF_SUFFIX;
BaseUtil.exportDocument(templateFile, params, wordPath, pdfPath, response);
}

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