Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 7 months ago
parent
commit
0dfb95cbdb
  1. 7
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferencePlanEntity.java
  2. 8
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/RehearsalPlanEntity.java
  3. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java
  4. 10
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java
  5. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java
  6. 9
      hzims-service/safeproduct/src/main/resources/db/2.0.1.sql

7
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferencePlanEntity.java

@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@ -33,12 +34,14 @@ public class ConferencePlanEntity extends BaseEntity {
private String theme;
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@ApiModelProperty("会议计划开始时间")
private Date scheduledStartTime;
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@ApiModelProperty("会议计划结束时间")
private Date scheduledEndTime;

8
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/RehearsalPlanEntity.java

@ -7,7 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@ -34,12 +34,14 @@ public class RehearsalPlanEntity extends BaseEntity {
private String subject;
@NotNull
@JsonFormat(pattern = DateUtil.PATTERN_DATE)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@ApiModelProperty("演练计划开始时间")
private Date scheduledStartTime;
@NotNull
@JsonFormat(pattern = DateUtil.PATTERN_DATE)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@ApiModelProperty("演练计划结束时间")
private Date scheduledEndTime;

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

@ -116,6 +116,9 @@ public class ConferenceRecordServiceImpl extends ServiceImpl<ConferenceRecordMap
String code = conferenceRecordDetailVO.getCode();
conferenceRecordDetailVO.setYear(code.substring(4, 8));
conferenceRecordDetailVO.setMonth(code.substring(8, 10));
// 内容: 换行符使用\r\n
String standardContent = conferenceRecordDetailVO.getContent().replaceAll("\n", "\r\n");
conferenceRecordDetailVO.setContent(standardContent);
// 图片
List<ImageEntity> list = new ArrayList<>();
if (StringUtils.isNotEmpty(conferenceRecordDetailVO.getImgPath())) {

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

@ -141,14 +141,14 @@ public class RehearsalRecordServiceImpl extends ServiceImpl<RehearsalRecordMappe
public void exportRehearsalRecordData(Long id, HttpServletResponse response) {
RehearsalRecordDetailVO rehearsalRecordDetailVO = this.getRecordDetailVOById(id);
// 数据处理
// 图片
// 时间
if (StringUtils.isNotEmpty(rehearsalRecordDetailVO.getActualStartTime())){
rehearsalRecordDetailVO.setActualStartTime(TimeUtils.format(rehearsalRecordDetailVO.getActualStartTime()));
}
if (StringUtils.isNotEmpty(rehearsalRecordDetailVO.getActualEndTime())){
rehearsalRecordDetailVO.setActualEndTime(TimeUtils.format(rehearsalRecordDetailVO.getActualEndTime()));
}
// 图片
List<ImageEntity> list = new ArrayList<>();
if (StringUtils.isNotEmpty(rehearsalRecordDetailVO.getImgPath())) {
String[] imgArr = rehearsalRecordDetailVO.getImgPath().split(",");
@ -162,6 +162,12 @@ public class RehearsalRecordServiceImpl extends ServiceImpl<RehearsalRecordMappe
list.add(new ImageEntity());
}
rehearsalRecordDetailVO.setImages(list);
// 记录:换行符使用\r\n
String standardRecord = rehearsalRecordDetailVO.getRecord().replaceAll("\n", "\r\n");
rehearsalRecordDetailVO.setRecord(standardRecord);
// 评价:换行符使用\r\n
String standardComment = rehearsalRecordDetailVO.getComment().replaceAll("\n", "\r\n");
rehearsalRecordDetailVO.setComment(standardComment);
// 表头年月
String code = rehearsalRecordDetailVO.getCode();
rehearsalRecordDetailVO.setYear(code.substring(4, 8));

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

@ -157,6 +157,12 @@ public class TrainRecordServiceImpl extends ServiceImpl<TrainRecordMapper, Train
} else {
trainRecordDetailVO.setTrainMethod(TrainMethodEnum.OFFLINE.getDesc());
}
// 内容:换行符使用\r\n
String standardContent = trainRecordDetailVO.getContent().replaceAll("\n", "\r\n");
trainRecordDetailVO.setContent(standardContent);
// 评价:换行符使用\r\n
String standardCommand = trainRecordDetailVO.getCommand().replaceAll("\n", "\r\n");
trainRecordDetailVO.setCommand(standardCommand);
// 图片
if (StringUtils.isNotEmpty(trainRecordDetailVO.getImgPath())) {
trainRecordDetailVO.setImages(Arrays.stream(trainRecordDetailVO.getImgPath().split(",")).map(img->

9
hzims-service/safeproduct/src/main/resources/db/2.0.1.sql

@ -0,0 +1,9 @@
-- 会议计划表:修改会议计划开始时间、会议计划结束时间字段
ALTER TABLE hzims_conference_plan
MODIFY COLUMN scheduled_start_time datetime NOT NULL COMMENT '会议计划开始时间',
MODIFY COLUMN scheduled_end_time datetime NOT NULL COMMENT '会议计划结束时间';
-- 演练计划表:修改演练计划开始时间、演练计划结束时间字段
ALTER TABLE hzims_rehearsal_plan
MODIFY COLUMN scheduled_start_time datetime NOT NULL COMMENT '演练计划开始时间',
MODIFY COLUMN scheduled_end_time datetime NOT NULL COMMENT '演练计划结束时间';
Loading…
Cancel
Save