fix
This commit is contained in:
commit
2e5c6fe034
|
@ -180,6 +180,17 @@ public class ApiContactDbController extends ApiBaseController {
|
|||
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
|
||||
}
|
||||
|
||||
@ApiOperation("会议环节2")
|
||||
@PostMapping("state/conference2")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass =
|
||||
ContactDbDto.class)})
|
||||
public void stateConferenceSave(@RequestBody @Validated ConferenceRequest conferenceRequest) {
|
||||
ContactDb contactDb = contactDbService.stateConferenceSave(conferenceRequest, getApiUser());
|
||||
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("测评环节")
|
||||
@PostMapping("state/evaluate")
|
||||
@ResponseBody
|
||||
|
|
|
@ -74,4 +74,10 @@ public class ContactDbAttachment extends BaseEntity {
|
|||
@ApiModelProperty(value = "会议名称")
|
||||
private String conferenceName;
|
||||
|
||||
/**
|
||||
* 会议记录组id
|
||||
*/
|
||||
@ApiModelProperty(value = "会议记录组id")
|
||||
private String conferenceRecordId;
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
package com.ydool.boot.modules.rddb.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ydool.boot.core.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会议记录组
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
|
||||
@TableName("t_contact_db_conference_record")
|
||||
public class ContactDbConferenceRecord extends BaseEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者")
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@ApiModelProperty(value = "更新者")
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 常委联系代表id
|
||||
*/
|
||||
@ApiModelProperty(value = "常委联系代表id")
|
||||
private String contactDbId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package com.ydool.boot.modules.rddb.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ydool.boot.core.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会议记录组关联部门人员
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_contact_db_conference_record_user")
|
||||
@Accessors(chain = true)
|
||||
|
||||
public class ContactDbConferenceRecordUser extends BaseEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者")
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@ApiModelProperty(value = "更新者")
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 会议记录组id
|
||||
*/
|
||||
@ApiModelProperty(value = "会议记录组id")
|
||||
private String conferenceRecordId;
|
||||
|
||||
/**
|
||||
* 常委联系代表id
|
||||
*/
|
||||
@ApiModelProperty(value = "常委联系代表id")
|
||||
private String contactDbId;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@ApiModelProperty(value = "部门")
|
||||
private String dept;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
@ApiModelProperty(value = "用户")
|
||||
private String user;
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.ydool.boot.modules.rddb.entity.dto;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDbAttachment;
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDbConferenceRecord;
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDbConferenceRecordUser;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ConferenceRecordDto extends ContactDbConferenceRecord {
|
||||
@ApiModelProperty(value = "附件")
|
||||
List<ContactDbAttachment> contactDbAttachments;
|
||||
@ApiModelProperty(value = "部门用户")
|
||||
List<ContactDbConferenceRecordUser> contactDbConferenceRecordUsers;
|
||||
}
|
|
@ -14,8 +14,11 @@ import java.util.List;
|
|||
@Data
|
||||
public class ContactDbDto extends ContactDb {
|
||||
|
||||
@ApiModelProperty(value = "会议记录")
|
||||
List<ContactDbAttachment> conferenceRecordAttachmentList;
|
||||
// @ApiModelProperty(value = "会议记录")
|
||||
// List<ContactDbAttachment> conferenceRecordAttachmentList;
|
||||
@ApiModelProperty(value = "会议记录组")
|
||||
List<ConferenceRecordDto> conferenceRecords;
|
||||
|
||||
@ApiModelProperty(value = "会议图片")
|
||||
List<ContactDbAttachment> conferencePhotoAttachmentList;
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.contact_db.state;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ConferenceRecord {
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "附件")
|
||||
private List<ConferenceRecordAttachment> conferenceRecordAttachments;
|
||||
@ApiModelProperty(value = "部门用户")
|
||||
private List<ConferenceRecordUser> conferenceRecordUsers;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.contact_db.state;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ConferenceRecordAttachment {
|
||||
@ApiModelProperty(value = "会议记录附件名 英文逗号间隔")
|
||||
String conferenceRecordAttachmentName;
|
||||
@ApiModelProperty(value = "会议记录附件路径 英文逗号间隔")
|
||||
String conferenceRecordAttachmentPath;
|
||||
|
||||
@ApiModelProperty(value = "会议记录附件关联会议id 英文逗号间隔")
|
||||
String conferenceRecordAttachmentConferenceId;
|
||||
@ApiModelProperty(value = "会议记录附件关联会议名称 英文逗号间隔")
|
||||
String conferenceRecordAttachmentConferenceName;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.contact_db.state;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ConferenceRecordUser {
|
||||
@ApiModelProperty(value = "部门")
|
||||
private String dept;
|
||||
@ApiModelProperty(value = "人员")
|
||||
private String user;
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.contact_db.state;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ConferenceRequest {
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 转办部门
|
||||
*/
|
||||
@ApiModelProperty(value = "转办部门")
|
||||
private String conferenceTransferDept;
|
||||
|
||||
/**
|
||||
* 会议时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "会议时间")
|
||||
private LocalDateTime conferenceAt;
|
||||
|
||||
/**
|
||||
* 会议备注
|
||||
*/
|
||||
@ApiModelProperty(value = "会议备注")
|
||||
private String conferenceRemark;
|
||||
|
||||
@ApiModelProperty(value = "会议记录组")
|
||||
private List<ConferenceRecord> conferenceRecords;
|
||||
|
||||
@ApiModelProperty(value = "会议图片附件名 英文逗号间隔")
|
||||
String conferencePhotoAttachmentName;
|
||||
@ApiModelProperty(value = "会议图片附件路径 英文逗号间隔")
|
||||
String conferencePhotoAttachmentPath;
|
||||
|
||||
@ApiModelProperty(value = "会议图片附件关联会议id 英文逗号间隔")
|
||||
String conferencePhotoAttachmentConferenceId;
|
||||
@ApiModelProperty(value = "会议图片附件关联会议名称 英文逗号间隔")
|
||||
String conferencePhotoAttachmentConferenceName;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "会议用户id 英文逗号间隔")
|
||||
String conferenceUserIds;
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDbConferenceRecord;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会议记录组 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-23
|
||||
*/
|
||||
public interface ContactDbConferenceRecordMapper extends BaseMapper<ContactDbConferenceRecord> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDbConferenceRecordUser;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会议记录组关联部门人员 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-23
|
||||
*/
|
||||
public interface ContactDbConferenceRecordUserMapper extends BaseMapper<ContactDbConferenceRecordUser> {
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ydool.boot.modules.rddb.mapper.ContactDbConferenceRecordMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ydool.boot.modules.rddb.mapper.ContactDbConferenceRecordUserMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,20 @@
|
|||
package com.ydool.boot.modules.rddb.service;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDbConferenceRecord;
|
||||
import com.ydool.boot.modules.rddb.mapper.ContactDbConferenceRecordMapper;
|
||||
import com.ydool.boot.modules.rddb.service.inter.IContactDbConferenceRecordService;
|
||||
import com.ydool.boot.core.service.BaseService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会议记录组 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-23
|
||||
*/
|
||||
@Service
|
||||
public class ContactDbConferenceRecordService extends BaseService<ContactDbConferenceRecordMapper, ContactDbConferenceRecord> implements IContactDbConferenceRecordService {
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.ydool.boot.modules.rddb.service;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDbConferenceRecordUser;
|
||||
import com.ydool.boot.modules.rddb.mapper.ContactDbConferenceRecordUserMapper;
|
||||
import com.ydool.boot.modules.rddb.service.inter.IContactDbConferenceRecordUserService;
|
||||
import com.ydool.boot.core.service.BaseService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会议记录组关联部门人员 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-23
|
||||
*/
|
||||
@Service
|
||||
public class ContactDbConferenceRecordUserService extends BaseService<ContactDbConferenceRecordUserMapper, ContactDbConferenceRecordUser> implements IContactDbConferenceRecordUserService {
|
||||
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package com.ydool.boot.modules.rddb.service;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
@ -19,6 +20,9 @@ import com.ydool.boot.modules.rddb.entity.request.CommentRequest;
|
|||
import com.ydool.boot.modules.rddb.entity.request.ScoreRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.contact_db.SignRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.contact_db.state.*;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.CheckAttachment;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.CheckUser;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.WorkCheck;
|
||||
import com.ydool.boot.modules.rddb.mapper.ContactDbMapper;
|
||||
import com.ydool.boot.modules.rddb.wrapper.ContactDbWrapper;
|
||||
import com.ydool.boot.modules.sys.entity.User;
|
||||
|
@ -57,6 +61,13 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
|
|||
@Autowired
|
||||
ConferenceAttachmentService conferenceAttachmentService;
|
||||
|
||||
@Autowired
|
||||
ContactDbConferenceRecordService contactDbConferenceRecordService;
|
||||
|
||||
@Autowired
|
||||
ContactDbConferenceRecordUserService contactDbConferenceRecordUserService;
|
||||
|
||||
|
||||
/*后台*/
|
||||
@Transactional
|
||||
public boolean del(String id) {
|
||||
|
@ -179,6 +190,85 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
|
|||
return contactDb;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public ContactDb stateConferenceSave(ConferenceRequest conferenceRequest, User loginUser) {
|
||||
ContactDb contactDb = getById(conferenceRequest.getId());
|
||||
Assert.notNull(contactDb, "未找到该记录");
|
||||
if (ContactDb.STATE_CONFERENCE != contactDb.getState())
|
||||
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
BeanUtil.copyProperties(conferenceRequest, contactDb);
|
||||
contactDb.setState(ContactDb.STATE_EVALUATE);
|
||||
contactDb.setUpdatedId(loginUser.getId());
|
||||
saveOrUpdate(contactDb);
|
||||
saveUser(contactDb.getId(), conferenceRequest.getConferenceUserIds(), loginUser,
|
||||
ContactDb.STATE_CONFERENCE);
|
||||
saveAttachment(contactDb.getId(), conferenceRequest.getConferencePhotoAttachmentName(),
|
||||
conferenceRequest.getConferencePhotoAttachmentPath(), loginUser,
|
||||
ContactDbAttachment.TYPE_CONFERENCE_PHOTO,
|
||||
conferenceRequest.getConferencePhotoAttachmentConferenceId(),
|
||||
conferenceRequest.getConferencePhotoAttachmentConferenceName());
|
||||
//保存会议记录组
|
||||
saveAttachment(contactDb, conferenceRequest, loginUser);
|
||||
return contactDb;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void saveAttachment(ContactDb contactDb, ConferenceRequest conferenceRequest, User loginUser) {
|
||||
//删除之前记录
|
||||
contactDbConferenceRecordService.remove(new QueryWrapper<ContactDbConferenceRecord>().eq("contact_db_id",
|
||||
conferenceRequest.getId()));
|
||||
contactDbConferenceRecordUserService.remove(new QueryWrapper<ContactDbConferenceRecordUser>().eq(
|
||||
"contact_db_id",
|
||||
conferenceRequest.getId()));
|
||||
contactDbAttachmentService.remove(new LambdaQueryWrapper<ContactDbAttachment>().eq(ContactDbAttachment::getContactDbId, conferenceRequest.getId())
|
||||
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_RECORD));
|
||||
|
||||
|
||||
List<ConferenceRecord> conferenceRecords = conferenceRequest.getConferenceRecords();
|
||||
if (CollectionUtil.isNotEmpty(conferenceRecords)) {
|
||||
conferenceRecords.stream().forEach(conferenceRecord -> {
|
||||
//新增附件组
|
||||
ContactDbConferenceRecord contactDbConferenceRecord =
|
||||
new ContactDbConferenceRecord().setContactDbId(conferenceRequest.getId()).setName(conferenceRecord.getName());
|
||||
contactDbConferenceRecordService.saveOrUpdate(contactDbConferenceRecord);
|
||||
|
||||
|
||||
//新增附件
|
||||
List<ConferenceRecordAttachment> conferenceRecordAttachments =
|
||||
conferenceRecord.getConferenceRecordAttachments();
|
||||
if (CollectionUtil.isNotEmpty(conferenceRecordAttachments)) {
|
||||
List<ContactDbAttachment> contactDbAttachments = new ArrayList<ContactDbAttachment>();
|
||||
conferenceRecordAttachments.stream().forEach(recordAttachment -> {
|
||||
ContactDbAttachment contactDbAttachment = new ContactDbAttachment();
|
||||
contactDbAttachment.setType(ContactDbAttachment.TYPE_CONFERENCE_RECORD).setConferenceId(recordAttachment.getConferenceRecordAttachmentConferenceId())
|
||||
.setConferenceName(recordAttachment.getConferenceRecordAttachmentConferenceName()).setConferenceRecordId(contactDbConferenceRecord.getId()).
|
||||
setContactDbId(contactDb.getId()).setTitle(recordAttachment.getConferenceRecordAttachmentName()).setAttachment(recordAttachment.getConferenceRecordAttachmentPath()).setCreatedId(loginUser.getId()).setCreatedAt(LocalDateTime.now());
|
||||
contactDbAttachments.add(contactDbAttachment);
|
||||
|
||||
conferenceAttachmentService.associationMeeting(recordAttachment.getConferenceRecordAttachmentConferenceId(), recordAttachment.getConferenceRecordAttachmentPath(),
|
||||
recordAttachment.getConferenceRecordAttachmentName(), "工作评议附件", loginUser.getId());
|
||||
});
|
||||
contactDbAttachmentService.saveBatch(contactDbAttachments);
|
||||
}
|
||||
|
||||
//新增用户
|
||||
List<ConferenceRecordUser> conferenceRecordUsers = conferenceRecord.getConferenceRecordUsers();
|
||||
if (CollectionUtil.isNotEmpty(conferenceRecordUsers)) {
|
||||
List<ContactDbConferenceRecordUser> contactDbConferenceRecordUsers =
|
||||
new ArrayList<ContactDbConferenceRecordUser>();
|
||||
conferenceRecordUsers.stream().forEach(conferenceRecordUser -> {
|
||||
ContactDbConferenceRecordUser contactDbConferenceRecordUser =
|
||||
new ContactDbConferenceRecordUser().setConferenceRecordId(contactDbConferenceRecord.getId()).setContactDbId(contactDb.getId()).setDept(conferenceRecordUser.getDept()).setUser(conferenceRecordUser.getUser());
|
||||
contactDbConferenceRecordUsers.add(contactDbConferenceRecordUser);
|
||||
});
|
||||
contactDbConferenceRecordUserService.saveBatch(contactDbConferenceRecordUsers);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public ContactDb stateEvaluateSave(ContactDbEvaluateRequest contactDbEvaluateRequest, User loginUser) {
|
||||
ContactDb contactDb = getById(contactDbEvaluateRequest.getId());
|
||||
|
|
|
@ -454,6 +454,7 @@ public class ReviewOfficerService extends BaseService<ReviewOfficerMapper, Revie
|
|||
for (int i = 0; i < nameArr.length; i++) {
|
||||
ReviewOfficerAttachment reviewAttachment = new ReviewOfficerAttachment();
|
||||
reviewAttachment.setType(state)
|
||||
.setReviewId(reviewId)
|
||||
.setTitle(nameArr[i])
|
||||
.setAttachment(pathArr[i])
|
||||
.setCreatedId(loginUser.getId())
|
||||
|
|
|
@ -263,19 +263,21 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
List<ReviewWorkAttachment> reviewWorkAttachments = new ArrayList<ReviewWorkAttachment>();
|
||||
checkAttachments.stream().forEach(checkAttachment -> {
|
||||
ReviewWorkAttachment reviewAttachment = new ReviewWorkAttachment();
|
||||
reviewAttachment.setType(reviewWork.getState()).setConferenceId(checkAttachment.getCheckAttachmentConferenceId())
|
||||
reviewAttachment.setType(reviewWork.getState()).setConferenceId(checkAttachment.getCheckAttachmentConferenceId()).setWorkCheckId(reviewWorkCheck.getId())
|
||||
.setConferenceName(checkAttachment.getCheckAttachmentConferenceName())
|
||||
.setReviewId(workCheckRequest.getReviewId())
|
||||
.setTitle(checkAttachment.getCheckAttachmentName())
|
||||
.setAttachment(checkAttachment.getCheckAttachmentPath())
|
||||
.setCreatedId(loginUser.getId())
|
||||
.setCreatedAt(LocalDateTime.now());
|
||||
reviewWorkAttachmentService.save(reviewAttachment);
|
||||
reviewWorkAttachments.add(reviewAttachment);
|
||||
|
||||
|
||||
conferenceAttachmentService.associationMeeting(checkAttachment.getCheckAttachmentConferenceId(), checkAttachment.getCheckAttachmentPath(),
|
||||
checkAttachment.getCheckAttachmentName(), "工作评议附件", loginUser.getId());
|
||||
|
||||
});
|
||||
reviewWorkAttachmentService.saveBatch(reviewWorkAttachments);
|
||||
}
|
||||
|
||||
//新增用户
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.service.inter;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDbConferenceRecord;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会议记录组 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-23
|
||||
*/
|
||||
public interface IContactDbConferenceRecordService extends IService<ContactDbConferenceRecord> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.service.inter;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDbConferenceRecordUser;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会议记录组关联部门人员 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-23
|
||||
*/
|
||||
public interface IContactDbConferenceRecordUserService extends IService<ContactDbConferenceRecordUser> {
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.ydool.boot.modules.rddb.web;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import com.ydool.boot.core.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会议记录组 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-23
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/rddb/contactDbConferenceRecord")
|
||||
public class ContactDbConferenceRecordController extends BaseController {
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.ydool.boot.modules.rddb.web;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import com.ydool.boot.core.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会议记录组关联部门人员 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-23
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/rddb/contactDbConferenceRecordUser")
|
||||
public class ContactDbConferenceRecordUserController extends BaseController {
|
||||
|
||||
}
|
|
@ -9,13 +9,17 @@ import com.ydool.boot.api.util.UserInfo;
|
|||
import com.ydool.boot.common.utils.SpringUtils;
|
||||
import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||
import com.ydool.boot.modules.rddb.entity.*;
|
||||
import com.ydool.boot.modules.rddb.entity.dto.ConferenceRecordDto;
|
||||
import com.ydool.boot.modules.rddb.entity.dto.ContactDbDto;
|
||||
import com.ydool.boot.modules.rddb.mapper.ConferenceMapper;
|
||||
import com.ydool.boot.modules.rddb.service.ContactDbAttachmentService;
|
||||
import com.ydool.boot.modules.rddb.service.ContactDbConferenceRecordService;
|
||||
import com.ydool.boot.modules.rddb.service.ContactDbConferenceRecordUserService;
|
||||
import com.ydool.boot.modules.rddb.service.ContactDbUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
@ -37,30 +41,87 @@ public class ContactDbWrapper extends BaseWrapper<ContactDb, ContactDbDto> {
|
|||
|
||||
ContactDbAttachmentService contactDbAttachmentService = SpringUtils.getBean(ContactDbAttachmentService.class);
|
||||
ContactDbUserService contactDbUserService = SpringUtils.getBean(ContactDbUserService.class);
|
||||
ContactDbConferenceRecordService contactDbConferenceRecordService =
|
||||
SpringUtils.getBean(ContactDbConferenceRecordService.class);
|
||||
ContactDbConferenceRecordUserService contactDbConferenceRecordUserService =
|
||||
SpringUtils.getBean(ContactDbConferenceRecordUserService.class);
|
||||
|
||||
List<ContactDbAttachment> recordAttachmentList = contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>()
|
||||
.eq(ContactDbAttachment::getContactDbId, contactDb.getId())
|
||||
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_RECORD)
|
||||
.orderByDesc(ContactDbAttachment::getCreatedAt));
|
||||
|
||||
//获取关联会议名称
|
||||
if (CollectionUtil.isNotEmpty(recordAttachmentList)) {
|
||||
recordAttachmentList.stream().forEach(i -> {
|
||||
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||
String conferenceName = "";
|
||||
if (conference != null) {
|
||||
conferenceName = conference.getTitle();
|
||||
}
|
||||
i.setConferenceName(conferenceName);
|
||||
// List<ContactDbAttachment> recordAttachmentList = contactDbAttachmentService.list(new
|
||||
// LambdaQueryWrapper<ContactDbAttachment>()
|
||||
// .eq(ContactDbAttachment::getContactDbId, contactDb.getId())
|
||||
// .eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_RECORD)
|
||||
// .orderByDesc(ContactDbAttachment::getCreatedAt));
|
||||
//
|
||||
// //获取关联会议名称
|
||||
// if (CollectionUtil.isNotEmpty(recordAttachmentList)) {
|
||||
// recordAttachmentList.stream().forEach(i -> {
|
||||
// if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||
// Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||
// String conferenceName = "";
|
||||
// if (conference != null) {
|
||||
// conferenceName = conference.getTitle();
|
||||
// }
|
||||
// i.setConferenceName(conferenceName);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//会议记录组
|
||||
List<ContactDbConferenceRecord> contactDbConferenceRecords =
|
||||
contactDbConferenceRecordService.list(new LambdaQueryWrapper<ContactDbConferenceRecord>().eq(ContactDbConferenceRecord::getContactDbId, contactDb.getId()));
|
||||
List<ConferenceRecordDto> conferenceRecords = new ArrayList<ConferenceRecordDto>();
|
||||
|
||||
if (CollectionUtil.isNotEmpty(contactDbConferenceRecords)) {
|
||||
contactDbConferenceRecords.stream().forEach(conferenceRecord -> {
|
||||
//组ID
|
||||
String conferenceRecordId = conferenceRecord.getId();
|
||||
|
||||
//获取关联附件
|
||||
List<ContactDbAttachment> recordAttachmentList = contactDbAttachmentService.list(new
|
||||
LambdaQueryWrapper<ContactDbAttachment>()
|
||||
.eq(ContactDbAttachment::getConferenceRecordId, conferenceRecordId)
|
||||
.eq(ContactDbAttachment::getContactDbId, contactDb.getId())
|
||||
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_RECORD)
|
||||
.orderByDesc(ContactDbAttachment::getCreatedAt));
|
||||
//获取附件关联会议名称
|
||||
if (CollectionUtil.isNotEmpty(recordAttachmentList)) {
|
||||
recordAttachmentList.stream().forEach(i -> {
|
||||
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||
String conferenceName = "";
|
||||
if (conference != null) {
|
||||
conferenceName = conference.getTitle();
|
||||
}
|
||||
i.setConferenceName(conferenceName);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//获取评议组织人员
|
||||
List<ContactDbConferenceRecordUser> contactDbConferenceRecordUsers =
|
||||
contactDbConferenceRecordUserService.list(new LambdaQueryWrapper<ContactDbConferenceRecordUser>()
|
||||
.eq(ContactDbConferenceRecordUser::getConferenceRecordId, conferenceRecordId).eq(ContactDbConferenceRecordUser::getContactDbId, contactDb.getId()));
|
||||
|
||||
|
||||
ConferenceRecordDto conferenceRecordDto = BeanUtil.copyProperties(conferenceRecord,
|
||||
ConferenceRecordDto.class);
|
||||
conferenceRecordDto.setContactDbAttachments(recordAttachmentList);
|
||||
conferenceRecordDto.setContactDbConferenceRecordUsers(contactDbConferenceRecordUsers);
|
||||
conferenceRecords.add(conferenceRecordDto);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
List<ContactDbAttachment> photoAttachmentList = contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>()
|
||||
.eq(ContactDbAttachment::getContactDbId, contactDb.getId())
|
||||
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_PHOTO)
|
||||
.orderByDesc(ContactDbAttachment::getCreatedAt));
|
||||
|
||||
dto.setConferenceRecords(conferenceRecords);
|
||||
|
||||
|
||||
List<ContactDbAttachment> photoAttachmentList =
|
||||
contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>()
|
||||
.eq(ContactDbAttachment::getContactDbId, contactDb.getId())
|
||||
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_PHOTO)
|
||||
.orderByDesc(ContactDbAttachment::getCreatedAt));
|
||||
|
||||
//获取关联会议名称
|
||||
if (CollectionUtil.isNotEmpty(photoAttachmentList)) {
|
||||
|
@ -76,11 +137,10 @@ public class ContactDbWrapper extends BaseWrapper<ContactDb, ContactDbDto> {
|
|||
});
|
||||
}
|
||||
|
||||
dto.setConferenceRecordAttachmentList(recordAttachmentList);
|
||||
// dto.setConferenceRecordAttachmentList(recordAttachmentList);
|
||||
dto.setConferencePhotoAttachmentList(photoAttachmentList);
|
||||
|
||||
|
||||
|
||||
List<ContactDbUser> subjectUserList = contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>()
|
||||
.eq(ContactDbUser::getContactDbId, contactDb.getId())
|
||||
.eq(ContactDbUser::getType, ContactDb.STATE_SUBJECT)
|
||||
|
@ -117,7 +177,8 @@ public class ContactDbWrapper extends BaseWrapper<ContactDb, ContactDbDto> {
|
|||
//打分结束算平均分
|
||||
if (ContactDb.STATE_END == contactDb.getState()) {
|
||||
//没打分的不算
|
||||
List<ContactDbUser> scoredUserList = evaluateUserList.stream().filter(item -> item.getScore() != null).collect(Collectors.toList());
|
||||
List<ContactDbUser> scoredUserList =
|
||||
evaluateUserList.stream().filter(item -> item.getScore() != null).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(scoredUserList)) {
|
||||
BigDecimal averageScore = scoredUserList.stream().map(item -> item.getScore())
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
|
@ -137,10 +198,12 @@ public class ContactDbWrapper extends BaseWrapper<ContactDb, ContactDbDto> {
|
|||
dto.setIsCanEvaluate(false);
|
||||
if (userInfo != null) {
|
||||
if (userInfo.getId().equals(contactDb.getCreatedId())) dto.setIsCreator(true);
|
||||
List<String> signUserIdList = signUserList.stream().map(ContactDbUser::getUserId).collect(Collectors.toList());
|
||||
List<String> signUserIdList =
|
||||
signUserList.stream().map(ContactDbUser::getUserId).collect(Collectors.toList());
|
||||
if (signUserIdList.contains(userInfo.getId())) dto.setIsCanSign(true);
|
||||
|
||||
List<String> evaluateUserIdList = evaluateUserList.stream().map(ContactDbUser::getUserId).collect(Collectors.toList());
|
||||
List<String> evaluateUserIdList =
|
||||
evaluateUserList.stream().map(ContactDbUser::getUserId).collect(Collectors.toList());
|
||||
if (evaluateUserIdList.contains(userInfo.getId())) dto.setIsCanEvaluate(true);
|
||||
}
|
||||
return dto;
|
||||
|
|
Loading…
Reference in New Issue