Browse Source

update: 会议管理模块逻辑优化

zhongwei
liwen 11 months ago
parent
commit
b917c1b5f8
  1. 3
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferencePlanEntity.java
  2. 1
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferenceRecordEntity.java
  3. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferencePlanServiceImpl.java
  4. 18
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java

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

@ -1,6 +1,7 @@
package com.hnac.hzims.safeproduct.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -32,10 +33,12 @@ public class ConferencePlanEntity extends BaseEntity {
private String theme;
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty("会议计划开始时间")
private Date scheduledStartTime;
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty("会议计划结束时间")
private Date scheduledEndTime;

1
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/ConferenceRecordEntity.java

@ -41,7 +41,6 @@ public class ConferenceRecordEntity extends BaseEntity {
@ApiModelProperty("记录人")
private String recorder;
@Size(max = 250, message = "会议内容字段长度不能超过250")
@ApiModelProperty("会议内容")
private String content;

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

@ -62,8 +62,8 @@ public class ConferencePlanServiceImpl extends ServiceImpl<ConferencePlanMapper,
public IPage<ConferencePlanEntity> planPage(Map<String, Object> param, Query query) {
QueryWrapper<ConferencePlanEntity> queryWrapper = new QueryWrapper<>();
String unit = String.valueOf(param.get("unit"));
String startTime = String.valueOf(param.get("startTime"));
String endTime = String.valueOf((param.get("endTime")));
String startTime = String.valueOf(param.get("scheduledStartTime"));
String endTime = String.valueOf((param.get("scheduledEndTime")));
if (!unit.equals("null") && !unit.equals("")) {
queryWrapper.lambda().like(ConferencePlanEntity::getUnit, unit);
}

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

@ -4,7 +4,6 @@ import cn.hutool.core.date.DatePattern;
import com.alibaba.excel.util.CollectionUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.common.logs.utils.StringUtils;
import com.hnac.hzims.safeproduct.constants.SafeProductConstant;
import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
@ -12,6 +11,7 @@ import com.hnac.hzims.safeproduct.enums.RehearsalStatusEnum;
import com.hnac.hzims.safeproduct.mapper.ConferencePlanMapper;
import com.hnac.hzims.safeproduct.mapper.ConferenceRecordMapper;
import com.hnac.hzims.safeproduct.service.IConferenceRecordService;
import com.hnac.hzims.safeproduct.utils.BaseUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -59,21 +59,7 @@ public class ConferenceRecordServiceImpl extends ServiceImpl<ConferenceRecordMap
// 查询是否存在同月编号
String lastCode = getLastCode(currentMonth);
// 若不存在,新增编号
String code;
if (StringUtils.isNull(lastCode)) {
code = "HYJL" + currentMonth + "001";
} else { // 若存在,编号递增
String oldNum = lastCode.substring(lastCode.length() - 3);
int value = Integer.parseInt(oldNum) + 1;
// 根据数位拼接编号
if (value < 10) {
code = "HYJL" + currentMonth + "00" + value;
} else if (value < 100) {
code = "HYJL" + currentMonth + "0" + value;
} else {
code = "HYJL" + currentMonth + value;
}
}
String code = BaseUtil.getUniqueCode("HYJL", lastCode, currentMonth);
conferenceRecord.setCode(code);
boolean save = this.save(conferenceRecord);
// 若会议记录新增成功,修改会议计划状态为已完成

Loading…
Cancel
Save