附件保存修改

This commit is contained in:
lijiaqi 2022-08-18 14:12:37 +08:00
parent 05e479f92d
commit 5dea81daf6
32 changed files with 388 additions and 60 deletions

View File

@ -144,18 +144,21 @@ public class ApiBaseDataController extends ApiBaseController {
render(Ret.ok().data(ConfigUtils.getStr(code))); render(Ret.ok().data(ConfigUtils.getStr(code)));
} }
@GetMapping("associationMeeting") // @GetMapping("associationMeeting")
@ResponseBody // @ResponseBody
@ApiOperation(value = "附件关联会议") // @ApiOperation(value = "附件关联会议")
@ApiImplicitParams({ // @ApiImplicitParams({
@ApiImplicitParam(name = "conferenceId", value = "关联会议id", required = true), // @ApiImplicitParam(name = "conferenceId", value = "关联会议id", required = true),
@ApiImplicitParam(name = "attachment", value = "关联附件路径", required = true), // @ApiImplicitParam(name = "attachment", value = "关联附件路径", required = true),
@ApiImplicitParam(name = "title", value = "附件名", required = true), // @ApiImplicitParam(name = "title", value = "附件名", required = true),
@ApiImplicitParam(name = "headline", value = "会议议题(附件所属的主题名)", required = true) // @ApiImplicitParam(name = "headline", value = "会议id", required = true),
}) // @ApiImplicitParam(name = "conferenceName", value = "会议名称", required = true),
public void associationMeeting(String conferenceId, String attachment, String title, String headline) { // @ApiImplicitParam(name = "type", value = "1任免督职2工作评议3专题评议4两官评议5常委会联系代表管理6审议督政", required = true)
boolean flag = conferenceAttachmentService.associationMeeting(conferenceId, attachment, title, headline, getApiUserId()); // })
renderJson(!flag ? Ret.fail("操作失败") : Ret.ok()); // public void associationMeeting(String conferenceId, String attachment, String title, String headline, String conferenceName, String type) {
} // boolean flag = conferenceAttachmentService.associationMeeting(conferenceId, attachment, title, headline,
// getApiUserId(),conferenceName,type);
// renderJson(!flag ? Ret.fail("操作失败") : Ret.ok());
// }
} }

View File

@ -61,4 +61,17 @@ public class AppointAttachment extends BaseEntity {
*/ */
private String size; private String size;
/**
* 附件名
*/
@ApiModelProperty(value = "会议ID")
private String conferenceId;
/**
* 附件路径
*/
@ApiModelProperty(value = "会议名称")
private String conferenceName;
} }

View File

@ -2,6 +2,7 @@ package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity; import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
@ -61,5 +62,16 @@ public class ContactDbAttachment extends BaseEntity {
* 文件大小 * 文件大小
*/ */
private String size; private String size;
/**
* 附件名
*/
@ApiModelProperty(value = "会议ID")
private String conferenceId;
/**
* 附件路径
*/
@ApiModelProperty(value = "会议名称")
private String conferenceName;
} }

View File

@ -2,6 +2,7 @@ package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity; import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
@ -57,4 +58,16 @@ public class ReviewOfficerAttachment extends BaseEntity {
*/ */
private String size; private String size;
/**
* 附件名
*/
@ApiModelProperty(value = "会议ID")
private String conferenceId;
/**
* 附件路径
*/
@ApiModelProperty(value = "会议名称")
private String conferenceName;
} }

View File

@ -2,6 +2,7 @@ package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity; import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
@ -57,4 +58,16 @@ public class ReviewSubjectAttachment extends BaseEntity {
*/ */
private String size; private String size;
/**
* 附件名
*/
@ApiModelProperty(value = "会议ID")
private String conferenceId;
/**
* 附件路径
*/
@ApiModelProperty(value = "会议名称")
private String conferenceName;
} }

View File

@ -2,6 +2,7 @@ package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity; import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
@ -68,4 +69,16 @@ public class ReviewSuperviseAttachment extends BaseEntity {
*/ */
private String size; private String size;
/**
* 附件名
*/
@ApiModelProperty(value = "会议ID")
private String conferenceId;
/**
* 附件路径
*/
@ApiModelProperty(value = "会议名称")
private String conferenceName;
} }

View File

@ -2,6 +2,7 @@ package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity; import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
@ -57,4 +58,16 @@ public class ReviewWorkAttachment extends BaseEntity {
*/ */
private String size; private String size;
/**
* 附件名
*/
@ApiModelProperty(value = "会议ID")
private String conferenceId;
/**
* 附件路径
*/
@ApiModelProperty(value = "会议名称")
private String conferenceName;
} }

View File

@ -57,4 +57,9 @@ public class AppointConferenceStateRequest {
@ApiModelProperty(value = "会议人员id,英文逗号间隔") @ApiModelProperty(value = "会议人员id,英文逗号间隔")
String conferenceUserIds; String conferenceUserIds;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String conferenceAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String conferenceAttachmentConferenceName;
} }

View File

@ -33,4 +33,8 @@ public class AppointPerformStateRequest {
@ApiModelProperty(value = "打分人员id,英文逗号间隔") @ApiModelProperty(value = "打分人员id,英文逗号间隔")
String performUserIds; String performUserIds;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String performAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String performAttachmentConferenceName;
} }

View File

@ -48,4 +48,9 @@ public class AppointProposeStateRequest {
@ApiModelProperty(value = "附件路径 英文逗号间隔") @ApiModelProperty(value = "附件路径 英文逗号间隔")
String proposeAttachmentPath; String proposeAttachmentPath;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String proposeAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String proposeAttachmentConferenceName;
} }

View File

@ -42,11 +42,22 @@ public class ContactDbConferenceRequest {
@ApiModelProperty(value = "会议记录附件路径 英文逗号间隔") @ApiModelProperty(value = "会议记录附件路径 英文逗号间隔")
String conferenceRecordAttachmentPath; String conferenceRecordAttachmentPath;
@ApiModelProperty(value = "会议记录附件关联会议id 英文逗号间隔")
String conferenceRecordAttachmentConferenceId;
@ApiModelProperty(value = "会议记录附件关联会议名称 英文逗号间隔")
String conferenceRecordAttachmentConferenceName;
@ApiModelProperty(value = "会议图片附件名 英文逗号间隔") @ApiModelProperty(value = "会议图片附件名 英文逗号间隔")
String conferencePhotoAttachmentName; String conferencePhotoAttachmentName;
@ApiModelProperty(value = "会议图片附件路径 英文逗号间隔") @ApiModelProperty(value = "会议图片附件路径 英文逗号间隔")
String conferencePhotoAttachmentPath; String conferencePhotoAttachmentPath;
@ApiModelProperty(value = "会议图片附件关联会议id 英文逗号间隔")
String conferencePhotoAttachmentConferenceId;
@ApiModelProperty(value = "会议图片附件关联会议名称 英文逗号间隔")
String conferencePhotoAttachmentConferenceName;
@ApiModelProperty(value = "会议用户id 英文逗号间隔") @ApiModelProperty(value = "会议用户id 英文逗号间隔")
String conferenceUserIds; String conferenceUserIds;
} }

View File

@ -44,4 +44,8 @@ public class ReviewOfficerCheckStateRequest {
*/ */
@ApiModelProperty(value = "admin机关办公/ rddb代表/ voter选民 多个用英文逗号间隔") @ApiModelProperty(value = "admin机关办公/ rddb代表/ voter选民 多个用英文逗号间隔")
private String obj; private String obj;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String checkAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String checkAttachmentConferenceName;
} }

View File

@ -49,4 +49,8 @@ public class ReviewOfficerInReportStateRequest {
String inReportAudit1Ids; String inReportAudit1Ids;
@ApiModelProperty(value = "二级审批人 英文逗号间隔") @ApiModelProperty(value = "二级审批人 英文逗号间隔")
String inReportAudit2Ids; String inReportAudit2Ids;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String inReportAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String inReportAttachmentConferenceName;
} }

View File

@ -37,4 +37,9 @@ public class ReviewOfficerOpinionStateRequest {
@ApiModelProperty(value = "附件路径 英文逗号间隔") @ApiModelProperty(value = "附件路径 英文逗号间隔")
String opinionAttachmentPath; String opinionAttachmentPath;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String opinionAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String opinionAttachmentConferenceName;
} }

View File

@ -37,4 +37,9 @@ public class ReviewOfficerResultStateRequest {
@ApiModelProperty(value = "附件路径 英文逗号间隔") @ApiModelProperty(value = "附件路径 英文逗号间隔")
String resultAttachmentPath; String resultAttachmentPath;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String resultAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String resultAttachmentConferenceName;
} }

View File

@ -44,4 +44,9 @@ public class ReviewSubjectCheckStateRequest {
*/ */
@ApiModelProperty(value = "admin机关办公/ rddb代表/ voter选民 多个用英文逗号间隔") @ApiModelProperty(value = "admin机关办公/ rddb代表/ voter选民 多个用英文逗号间隔")
private String obj; private String obj;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String checkAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String checkAttachmentConferenceName;
} }

View File

@ -49,4 +49,9 @@ public class ReviewSubjectInReportStateRequest {
String inReportAudit1Ids; String inReportAudit1Ids;
@ApiModelProperty(value = "二级审批人 英文逗号间隔") @ApiModelProperty(value = "二级审批人 英文逗号间隔")
String inReportAudit2Ids; String inReportAudit2Ids;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String inReportAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String inReportAttachmentConferenceName;
} }

View File

@ -36,5 +36,9 @@ public class ReviewSubjectOpinionStateRequest {
String opinionAttachmentName; String opinionAttachmentName;
@ApiModelProperty(value = "附件路径 英文逗号间隔") @ApiModelProperty(value = "附件路径 英文逗号间隔")
String opinionAttachmentPath; String opinionAttachmentPath;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String opinionAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String opinionAttachmentConferenceName;
} }

View File

@ -36,5 +36,10 @@ public class ReviewSubjectResultStateRequest {
String resultAttachmentName; String resultAttachmentName;
@ApiModelProperty(value = "附件路径 英文逗号间隔") @ApiModelProperty(value = "附件路径 英文逗号间隔")
String resultAttachmentPath; String resultAttachmentPath;
String opinionAttachmentPath;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String resultAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String resultAttachmentConferenceName;
} }

View File

@ -43,10 +43,18 @@ public class ReviewSuperviseCheckRequest {
String surveyAttachmentName; String surveyAttachmentName;
@ApiModelProperty(value = "调研报告附件路径 英文逗号间隔") @ApiModelProperty(value = "调研报告附件路径 英文逗号间隔")
String surveyAttachmentPath; String surveyAttachmentPath;
@ApiModelProperty(value = "调研报告附件关联会议id 英文逗号间隔")
String surveyAttachmentConferenceId;
@ApiModelProperty(value = "调研报告附件关联会议名称 英文逗号间隔")
String surveyAttachmentConferenceName;
@ApiModelProperty(value = "审议意见附件名 英文逗号间隔") @ApiModelProperty(value = "审议意见附件名 英文逗号间隔")
String reviewAttachmentName; String reviewAttachmentName;
@ApiModelProperty(value = "审议意见附件路径 英文逗号间隔") @ApiModelProperty(value = "审议意见附件路径 英文逗号间隔")
String reviewAttachmentPath; String reviewAttachmentPath;
@ApiModelProperty(value = "审议意见附件关联会议id 英文逗号间隔")
String reviewAttachmentConferenceId;
@ApiModelProperty(value = "审议意见附件关联会议名称 英文逗号间隔")
String reviewAttachmentConferenceName;
} }

View File

@ -31,4 +31,9 @@ public class ReviewSuperviseEvaluateRequest {
@ApiModelProperty(value = "admin机关办公/ rddb代表/ voter选民 多个用英文逗号间隔") @ApiModelProperty(value = "admin机关办公/ rddb代表/ voter选民 多个用英文逗号间隔")
@NotBlank(message = "请选择测评人员") @NotBlank(message = "请选择测评人员")
String obj; String obj;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String reviewAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String reviewAttachmentConferenceName;
} }

View File

@ -32,9 +32,18 @@ public class ReviewSuperviseTailRequest {
String tailAttachmentName; String tailAttachmentName;
@ApiModelProperty(value = "审议跟踪报告附件路径 英文逗号间隔") @ApiModelProperty(value = "审议跟踪报告附件路径 英文逗号间隔")
String tailAttachmentPath; String tailAttachmentPath;
@ApiModelProperty(value = "审议跟踪报告附件关联会议id 英文逗号间隔")
String tailAttachmentConferenceId;
@ApiModelProperty(value = "审议跟踪报告附件关联会议名称 英文逗号间隔")
String tailAttachmentConferenceName;
@ApiModelProperty(value = "审议研究报告附件名 英文逗号间隔") @ApiModelProperty(value = "审议研究报告附件名 英文逗号间隔")
String researchAttachmentName; String researchAttachmentName;
@ApiModelProperty(value = "审议研究报告附件路径 英文逗号间隔") @ApiModelProperty(value = "审议研究报告附件路径 英文逗号间隔")
String researchAttachmentPath; String researchAttachmentPath;
@ApiModelProperty(value = "审议研究报告附件关联会议id 英文逗号间隔")
String researchAttachmentConferenceId;
@ApiModelProperty(value = "审议研究报告附件关联会议名称 英文逗号间隔")
String researchAttachmentConferenceName;
} }

View File

@ -44,4 +44,9 @@ public class ReviewWorkCheckStateRequest {
*/ */
@ApiModelProperty(value = "admin机关办公/ rddb代表/ voter选民 多个用英文逗号间隔") @ApiModelProperty(value = "admin机关办公/ rddb代表/ voter选民 多个用英文逗号间隔")
private String obj; private String obj;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String checkAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String checkAttachmentConferenceName;
} }

View File

@ -43,4 +43,8 @@ public class ReviewWorkInReportStateRequest {
String inReportAudit1Ids; String inReportAudit1Ids;
@ApiModelProperty(value = "二级审批人 英文逗号间隔") @ApiModelProperty(value = "二级审批人 英文逗号间隔")
String inReportAudit2Ids; String inReportAudit2Ids;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String inReportAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String inReportAttachmentConferenceName;
} }

View File

@ -36,5 +36,9 @@ public class ReviewWorkOpinionStateRequest {
String opinionAttachmentName; String opinionAttachmentName;
@ApiModelProperty(value = "附件路径 英文逗号间隔") @ApiModelProperty(value = "附件路径 英文逗号间隔")
String opinionAttachmentPath; String opinionAttachmentPath;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String opinionAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String opinionAttachmentConferenceName;
} }

View File

@ -36,5 +36,8 @@ public class ReviewWorkResultStateRequest {
String resultAttachmentName; String resultAttachmentName;
@ApiModelProperty(value = "附件路径 英文逗号间隔") @ApiModelProperty(value = "附件路径 英文逗号间隔")
String resultAttachmentPath; String resultAttachmentPath;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
String resultAttachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
String resultAttachmentConferenceName;
} }

View File

@ -52,6 +52,9 @@ public class AppointService extends BaseService<AppointMapper, Appoint> {
@Autowired @Autowired
UserService userService; UserService userService;
@Autowired
ConferenceAttachmentService conferenceAttachmentService;
/*后台*/ /*后台*/
@Transactional @Transactional
public boolean del(String id) { public boolean del(String id) {
@ -86,6 +89,7 @@ public class AppointService extends BaseService<AppointMapper, Appoint> {
saveAppointAttachment(appointBo.getId(), appointBo.getProposeAttachmentArrStr(), loginUser, Appoint.STATE_PROPOSE); saveAppointAttachment(appointBo.getId(), appointBo.getProposeAttachmentArrStr(), loginUser, Appoint.STATE_PROPOSE);
saveAppointAttachment(appointBo.getId(), appointBo.getConferenceAttachmentArrStr(), loginUser, Appoint.STATE_CONFERENCE); saveAppointAttachment(appointBo.getId(), appointBo.getConferenceAttachmentArrStr(), loginUser, Appoint.STATE_CONFERENCE);
saveAppointAttachment(appointBo.getId(), appointBo.getPerformAttachmentArrStr(), loginUser, Appoint.STATE_PERFORM); saveAppointAttachment(appointBo.getId(), appointBo.getPerformAttachmentArrStr(), loginUser, Appoint.STATE_PERFORM);
return Ret.ok(); return Ret.ok();
} }
@ -97,7 +101,9 @@ public class AppointService extends BaseService<AppointMapper, Appoint> {
appoint.setState(Appoint.STATE_CONFERENCE); appoint.setState(Appoint.STATE_CONFERENCE);
appoint.setCreatedId(loginUser.getId()); appoint.setCreatedId(loginUser.getId());
saveOrUpdate(appoint); saveOrUpdate(appoint);
saveAppointAttachment(appoint.getId(), appointProposeRequest.getProposeAttachmentName(), appointProposeRequest.getProposeAttachmentPath(), loginUser, Appoint.STATE_PROPOSE); saveAppointAttachment(appoint.getId(), appointProposeRequest.getProposeAttachmentName(),
appointProposeRequest.getProposeAttachmentPath(), loginUser, Appoint.STATE_PROPOSE,
appointProposeRequest.getProposeAttachmentConferenceId(),appointProposeRequest.getProposeAttachmentConferenceName());
return appoint; return appoint;
} }
@ -110,7 +116,10 @@ public class AppointService extends BaseService<AppointMapper, Appoint> {
appoint.setState(Appoint.STATE_SCORE); appoint.setState(Appoint.STATE_SCORE);
appoint.setUpdatedId(loginUser.getId()); appoint.setUpdatedId(loginUser.getId());
saveOrUpdate(appoint); saveOrUpdate(appoint);
saveAppointAttachment(appoint.getId(), appointConferenceRequest.getConferenceAttachmentName(), appointConferenceRequest.getConferenceAttachmentPath(), loginUser, Appoint.STATE_CONFERENCE); saveAppointAttachment(appoint.getId(), appointConferenceRequest.getConferenceAttachmentName(),
appointConferenceRequest.getConferenceAttachmentPath(), loginUser, Appoint.STATE_CONFERENCE,
appointConferenceRequest.getConferenceAttachmentConferenceId(),
appointConferenceRequest.getConferenceAttachmentConferenceName());
saveAppointUser(appoint.getId(), appointConferenceRequest.getConferenceUserIds(), loginUser, Appoint.STATE_CONFERENCE); saveAppointUser(appoint.getId(), appointConferenceRequest.getConferenceUserIds(), loginUser, Appoint.STATE_CONFERENCE);
return appoint; return appoint;
} }
@ -193,7 +202,10 @@ public class AppointService extends BaseService<AppointMapper, Appoint> {
BeanUtil.copyProperties(appointPerformRequest, appoint); BeanUtil.copyProperties(appointPerformRequest, appoint);
appoint.setUpdatedId(loginUser.getId()); appoint.setUpdatedId(loginUser.getId());
saveOrUpdate(appoint); saveOrUpdate(appoint);
saveAppointAttachment(appoint.getId(), appointPerformRequest.getPerformAttachmentName(), appointPerformRequest.getPerformAttachmentPath(), loginUser, Appoint.STATE_PERFORM); saveAppointAttachment(appoint.getId(), appointPerformRequest.getPerformAttachmentName(),
appointPerformRequest.getPerformAttachmentPath(), loginUser, Appoint.STATE_PERFORM,
appointPerformRequest.getPerformAttachmentConferenceId(),
appointPerformRequest.getPerformAttachmentConferenceName());
saveAppointUser(appoint.getId(), appointPerformRequest.getPerformUserIds(), loginUser, Appoint.STATE_PERFORM); saveAppointUser(appoint.getId(), appointPerformRequest.getPerformUserIds(), loginUser, Appoint.STATE_PERFORM);
return appoint; return appoint;
} }
@ -331,8 +343,13 @@ public class AppointService extends BaseService<AppointMapper, Appoint> {
item.setType(state); item.setType(state);
item.setCreatedId(loginUser.getId()); item.setCreatedId(loginUser.getId());
item.setCreatedAt(LocalDateTime.now()); item.setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(item.getConferenceId())) {
conferenceAttachmentService.associationMeeting(item.getConferenceId(), item.getAttachment(), item.getTitle(), "任免督职附件", loginUser.getId());
}
}); });
appointAttachmentService.saveBatch(appointAttachmentList); appointAttachmentService.saveBatch(appointAttachmentList);
} }
} }
@ -343,21 +360,29 @@ public class AppointService extends BaseService<AppointMapper, Appoint> {
* @param loginUser * @param loginUser
* @param state * @param state
*/ */
private void saveAppointAttachment(String appointId, String attachmentName, String attachmentPath, User loginUser, Integer state) { private void saveAppointAttachment(String appointId, String attachmentName, String attachmentPath, User loginUser
, Integer state,String conferenceId,String conferenceName) {
appointAttachmentService.remove(new LambdaQueryWrapper<AppointAttachment>() appointAttachmentService.remove(new LambdaQueryWrapper<AppointAttachment>()
.eq(AppointAttachment::getAppointId, appointId) .eq(AppointAttachment::getAppointId, appointId)
.eq(AppointAttachment::getType, state)); .eq(AppointAttachment::getType, state));
if (StrUtil.isNotBlank(attachmentName)) { if (StrUtil.isNotBlank(attachmentName)) {
String[] nameArr = attachmentName.split(","); String[] nameArr = attachmentName.split(",");
String[] pathArr = attachmentPath.split(","); String[] pathArr = attachmentPath.split(",");
String[] conferenceIdArr = conferenceId.split(",");
String[] conferenceNameArr = conferenceName.split(",");
for (int i = 0; i < nameArr.length; i++) { for (int i = 0; i < nameArr.length; i++) {
AppointAttachment appointAttachment = new AppointAttachment(); AppointAttachment appointAttachment = new AppointAttachment();
appointAttachment.setType(state) appointAttachment.setType(state)
.setAppointId(appointId) .setAppointId(appointId)
.setConferenceId(conferenceIdArr[i])
.setConferenceName(conferenceNameArr[i])
.setTitle(nameArr[i]) .setTitle(nameArr[i])
.setAttachment(pathArr[i]) .setAttachment(pathArr[i])
.setCreatedId(loginUser.getId()) .setCreatedId(loginUser.getId())
.setCreatedAt(LocalDateTime.now()); .setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(conferenceIdArr[i])) {
conferenceAttachmentService.associationMeeting(conferenceIdArr[i], conferenceNameArr[i], nameArr[i], "任免督职附件", loginUser.getId());
}
appointAttachmentService.save(appointAttachment); appointAttachmentService.save(appointAttachment);
} }
} }

View File

@ -53,6 +53,9 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
@Autowired @Autowired
MessageService messageService; MessageService messageService;
@Autowired
ConferenceAttachmentService conferenceAttachmentService;
/*后台*/ /*后台*/
@Transactional @Transactional
public boolean del(String id) { public boolean del(String id) {
@ -99,7 +102,7 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
public Ret comment(CommentRequest commentRequest, User loginUser) { public Ret comment(CommentRequest commentRequest, User loginUser) {
ContactDb contactDb = getById(commentRequest.getId()); ContactDb contactDb = getById(commentRequest.getId());
Assert.notNull(contactDb, "未找到该记录"); Assert.notNull(contactDb, "未找到该记录");
ContactDbComment contactDbComment = BeanUtil.copyProperties(commentRequest, ContactDbComment.class,"id"); ContactDbComment contactDbComment = BeanUtil.copyProperties(commentRequest, ContactDbComment.class, "id");
contactDbComment.setContactDbId(commentRequest.getId()); contactDbComment.setContactDbId(commentRequest.getId());
contactDbComment.setCreatedId(loginUser.getId()); contactDbComment.setCreatedId(loginUser.getId());
contactDbComment.setUserId(loginUser.getId()); contactDbComment.setUserId(loginUser.getId());
@ -122,7 +125,8 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
public ContactDb stateChooseSave(ContactDbChooseRequest contactDbChooseRequest, User loginUser) { public ContactDb stateChooseSave(ContactDbChooseRequest contactDbChooseRequest, User loginUser) {
ContactDb contactDb = getById(contactDbChooseRequest.getId()); ContactDb contactDb = getById(contactDbChooseRequest.getId());
Assert.notNull(contactDb, "未找到该记录"); Assert.notNull(contactDb, "未找到该记录");
if (ContactDb.STATE_CHOOSE != contactDb.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息")); if (ContactDb.STATE_CHOOSE != contactDb.getState())
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(contactDbChooseRequest, contactDb); BeanUtil.copyProperties(contactDbChooseRequest, contactDb);
contactDb.setState(ContactDb.STATE_SIGN); contactDb.setState(ContactDb.STATE_SIGN);
contactDb.setUpdatedId(loginUser.getId()); contactDb.setUpdatedId(loginUser.getId());
@ -148,14 +152,23 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
public ContactDb stateConferenceSave(ContactDbConferenceRequest contactDbConferenceRequest, User loginUser) { public ContactDb stateConferenceSave(ContactDbConferenceRequest contactDbConferenceRequest, User loginUser) {
ContactDb contactDb = getById(contactDbConferenceRequest.getId()); ContactDb contactDb = getById(contactDbConferenceRequest.getId());
Assert.notNull(contactDb, "未找到该记录"); Assert.notNull(contactDb, "未找到该记录");
if (ContactDb.STATE_CONFERENCE != contactDb.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息")); if (ContactDb.STATE_CONFERENCE != contactDb.getState())
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(contactDbConferenceRequest, contactDb); BeanUtil.copyProperties(contactDbConferenceRequest, contactDb);
contactDb.setState(ContactDb.STATE_EVALUATE); contactDb.setState(ContactDb.STATE_EVALUATE);
contactDb.setUpdatedId(loginUser.getId()); contactDb.setUpdatedId(loginUser.getId());
saveOrUpdate(contactDb); saveOrUpdate(contactDb);
saveUser(contactDb.getId(), contactDbConferenceRequest.getConferenceUserIds(), loginUser, ContactDb.STATE_CONFERENCE); saveUser(contactDb.getId(), contactDbConferenceRequest.getConferenceUserIds(), loginUser, ContactDb.STATE_CONFERENCE);
saveAttachment(contactDb.getId(), contactDbConferenceRequest.getConferenceRecordAttachmentName(), contactDbConferenceRequest.getConferenceRecordAttachmentPath(), loginUser, ContactDbAttachment.TYPE_CONFERENCE_RECORD); saveAttachment(contactDb.getId(), contactDbConferenceRequest.getConferenceRecordAttachmentName(),
saveAttachment(contactDb.getId(), contactDbConferenceRequest.getConferencePhotoAttachmentName(), contactDbConferenceRequest.getConferencePhotoAttachmentPath(), loginUser, ContactDbAttachment.TYPE_CONFERENCE_PHOTO); contactDbConferenceRequest.getConferenceRecordAttachmentPath(), loginUser,
ContactDbAttachment.TYPE_CONFERENCE_RECORD,
contactDbConferenceRequest.getConferenceRecordAttachmentConferenceId(),
contactDbConferenceRequest.getConferenceRecordAttachmentConferenceName());
saveAttachment(contactDb.getId(), contactDbConferenceRequest.getConferencePhotoAttachmentName(),
contactDbConferenceRequest.getConferencePhotoAttachmentPath(), loginUser,
ContactDbAttachment.TYPE_CONFERENCE_PHOTO,
contactDbConferenceRequest.getConferencePhotoAttachmentConferenceId(),
contactDbConferenceRequest.getConferencePhotoAttachmentConferenceName());
return contactDb; return contactDb;
} }
@ -163,7 +176,8 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
public ContactDb stateEvaluateSave(ContactDbEvaluateRequest contactDbEvaluateRequest, User loginUser) { public ContactDb stateEvaluateSave(ContactDbEvaluateRequest contactDbEvaluateRequest, User loginUser) {
ContactDb contactDb = getById(contactDbEvaluateRequest.getId()); ContactDb contactDb = getById(contactDbEvaluateRequest.getId());
Assert.notNull(contactDb, "未找到该记录"); Assert.notNull(contactDb, "未找到该记录");
if (ContactDb.STATE_EVALUATE != contactDb.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息")); if (ContactDb.STATE_EVALUATE != contactDb.getState())
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(contactDbEvaluateRequest, contactDb); BeanUtil.copyProperties(contactDbEvaluateRequest, contactDb);
contactDb.setUpdatedId(loginUser.getId()); contactDb.setUpdatedId(loginUser.getId());
saveOrUpdate(contactDb); saveOrUpdate(contactDb);
@ -231,7 +245,8 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
ContactDb contactDb = getById(id); ContactDb contactDb = getById(id);
Assert.notNull(contactDb, "未找到该记录"); Assert.notNull(contactDb, "未找到该记录");
if (!loginUser.getId().equals(contactDb.getCreatedId())) return Ret.fail("您不是创建人,不能操作"); if (!loginUser.getId().equals(contactDb.getCreatedId())) return Ret.fail("您不是创建人,不能操作");
if (ContactDb.STATE_EVALUATE != contactDb.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息")); if (ContactDb.STATE_EVALUATE != contactDb.getState())
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
contactDb.setState(ContactDb.STATE_END); contactDb.setState(ContactDb.STATE_END);
boolean flag = saveOrUpdate(contactDb); boolean flag = saveOrUpdate(contactDb);
return !flag ? Ret.fail("操作失败") : Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)); return !flag ? Ret.fail("操作失败") : Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb));
@ -284,15 +299,14 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
.select(" IFNULL( max(sort_no),0) as sortNo") .select(" IFNULL( max(sort_no),0) as sortNo")
.eq("contact_db_id", contactDbId) .eq("contact_db_id", contactDbId)
.eq("type", type) .eq("type", type)
.eq("identity", identity) .eq("identity", identity);
;
Map map = contactDbUserService.getMap(maxQw); Map map = contactDbUserService.getMap(maxQw);
int sortNo = Convert.toInt(map.get("sortNo")); int sortNo = Convert.toInt(map.get("sortNo"));
List<String> userIdList = Arrays.asList(userIds.split(",")); List<String> userIdList = Arrays.asList(userIds.split(","));
List<ContactDbUser> userList = new ArrayList<>(); List<ContactDbUser> userList = new ArrayList<>();
Iterator<String> iterator = userIdList.iterator(); Iterator<String> iterator = userIdList.iterator();
while(iterator.hasNext()){ while (iterator.hasNext()) {
String userId = iterator.next(); String userId = iterator.next();
//1.已存在的不管 //1.已存在的不管
int count = contactDbUserService.count(new LambdaQueryWrapper<ContactDbUser>() int count = contactDbUserService.count(new LambdaQueryWrapper<ContactDbUser>()
@ -345,6 +359,9 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
item.setType(type); item.setType(type);
item.setCreatedId(loginUser.getId()); item.setCreatedId(loginUser.getId());
item.setCreatedAt(LocalDateTime.now()); item.setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(item.getConferenceId())) {
conferenceAttachmentService.associationMeeting(item.getConferenceId(), item.getAttachment(), item.getTitle(), "常委会联系代表附件", loginUser.getId());
}
}); });
contactDbAttachmentService.saveBatch(attachmentList); contactDbAttachmentService.saveBatch(attachmentList);
} }
@ -357,14 +374,22 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
* @param loginUser * @param loginUser
* @param type * @param type
*/ */
private void saveAttachment(String contactDbId, String attachmentName, String attachmentPath, User loginUser, String type) { private void saveAttachment(String contactDbId, String attachmentName, String attachmentPath, User loginUser,
String type,String conferenceId,String conferenceName) {
contactDbAttachmentService.remove(new LambdaQueryWrapper<ContactDbAttachment>().eq(ContactDbAttachment::getContactDbId, contactDbId).eq(ContactDbAttachment::getType, type)); contactDbAttachmentService.remove(new LambdaQueryWrapper<ContactDbAttachment>().eq(ContactDbAttachment::getContactDbId, contactDbId).eq(ContactDbAttachment::getType, type));
if (StrUtil.isNotBlank(attachmentName)) { if (StrUtil.isNotBlank(attachmentName)) {
String[] nameArr = attachmentName.split(","); String[] nameArr = attachmentName.split(",");
String[] pathArr = attachmentPath.split(","); String[] pathArr = attachmentPath.split(",");
String[] conferenceIdArr = conferenceId.split(",");
String[] conferenceNameArr = conferenceName.split(",");
for (int i = 0; i < nameArr.length; i++) { for (int i = 0; i < nameArr.length; i++) {
ContactDbAttachment contactDbAttachment = new ContactDbAttachment(); ContactDbAttachment contactDbAttachment = new ContactDbAttachment();
contactDbAttachment.setType(type).setContactDbId(contactDbId).setTitle(nameArr[i]).setAttachment(pathArr[i]).setCreatedId(loginUser.getId()).setCreatedAt(LocalDateTime.now()); contactDbAttachment.setType(type).setConferenceId(conferenceIdArr[i])
.setConferenceName(conferenceNameArr[i]).
setContactDbId(contactDbId).setTitle(nameArr[i]).setAttachment(pathArr[i]).setCreatedId(loginUser.getId()).setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(conferenceIdArr[i])) {
conferenceAttachmentService.associationMeeting(conferenceIdArr[i], conferenceNameArr[i], nameArr[i], "常委会联系代表附件", loginUser.getId());
}
contactDbAttachmentService.save(contactDbAttachment); contactDbAttachmentService.save(contactDbAttachment);
} }
} }

View File

@ -53,6 +53,9 @@ public class ReviewOfficerService extends BaseService<ReviewOfficerMapper, Revie
@Autowired @Autowired
ReviewOfficerUserService reviewOfficerUserService; ReviewOfficerUserService reviewOfficerUserService;
@Autowired
ConferenceAttachmentService conferenceAttachmentService;
@Autowired @Autowired
UserService userService; UserService userService;
@ -140,7 +143,11 @@ public class ReviewOfficerService extends BaseService<ReviewOfficerMapper, Revie
reviewOfficer.setStatus(0); reviewOfficer.setStatus(0);
reviewOfficer.setCreatedId(loginUser.getId()); reviewOfficer.setCreatedId(loginUser.getId());
saveOrUpdate(reviewOfficer); saveOrUpdate(reviewOfficer);
saveReviewOfficerAttachment(reviewOfficer.getId(), reviewOfficerInReportStateRequest.getInReportAttachmentName(), reviewOfficerInReportStateRequest.getInReportAttachmentPath(), loginUser, ReviewOfficer.STATE_IN_REPORT); saveReviewOfficerAttachment(reviewOfficer.getId(),
reviewOfficerInReportStateRequest.getInReportAttachmentName(),
reviewOfficerInReportStateRequest.getInReportAttachmentPath(), loginUser,
ReviewOfficer.STATE_IN_REPORT,reviewOfficerInReportStateRequest.getInReportAttachmentConferenceId(),
reviewOfficerInReportStateRequest.getInReportAttachmentConferenceName());
saveReviewOfficerAudit(reviewOfficer.getId(), reviewOfficerInReportStateRequest.getInReportAudit1Ids(), loginUser, 1); saveReviewOfficerAudit(reviewOfficer.getId(), reviewOfficerInReportStateRequest.getInReportAudit1Ids(), loginUser, 1);
saveReviewOfficerAudit(reviewOfficer.getId(), reviewOfficerInReportStateRequest.getInReportAudit2Ids(), loginUser, 2); saveReviewOfficerAudit(reviewOfficer.getId(), reviewOfficerInReportStateRequest.getInReportAudit2Ids(), loginUser, 2);
return reviewOfficer; return reviewOfficer;
@ -197,11 +204,14 @@ public class ReviewOfficerService extends BaseService<ReviewOfficerMapper, Revie
public ReviewOfficer stateCheckSave(ReviewOfficerCheckStateRequest reviewOfficerCheckStateRequest, User loginUser) { public ReviewOfficer stateCheckSave(ReviewOfficerCheckStateRequest reviewOfficerCheckStateRequest, User loginUser) {
ReviewOfficer reviewOfficer = getById(reviewOfficerCheckStateRequest.getReviewId()); ReviewOfficer reviewOfficer = getById(reviewOfficerCheckStateRequest.getReviewId());
Assert.notNull(reviewOfficer, "未找到该记录"); Assert.notNull(reviewOfficer, "未找到该记录");
if (ReviewOfficer.STATE_CHECK != reviewOfficer.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息")); if (ReviewOfficer.STATE_CHECK != reviewOfficer.getState())
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(reviewOfficerCheckStateRequest, reviewOfficer); BeanUtil.copyProperties(reviewOfficerCheckStateRequest, reviewOfficer);
saveOrUpdate(reviewOfficer); saveOrUpdate(reviewOfficer);
saveReviewOfficerAttachment(reviewOfficer.getId(), reviewOfficerCheckStateRequest.getCheckAttachmentName(), reviewOfficerCheckStateRequest.getCheckAttachmentPath(), loginUser, ReviewOfficer.STATE_CHECK); saveReviewOfficerAttachment(reviewOfficer.getId(), reviewOfficerCheckStateRequest.getCheckAttachmentName(),
reviewOfficerCheckStateRequest.getCheckAttachmentPath(), loginUser, ReviewOfficer.STATE_CHECK,
reviewOfficerCheckStateRequest.getCheckAttachmentConferenceId(), reviewOfficerCheckStateRequest.getCheckAttachmentConferenceName());
saveReviewOfficerUser(reviewOfficer.getId(), reviewOfficerCheckStateRequest.getCheckUserIds(), loginUser); saveReviewOfficerUser(reviewOfficer.getId(), reviewOfficerCheckStateRequest.getCheckUserIds(), loginUser);
return reviewOfficer; return reviewOfficer;
} }
@ -233,7 +243,8 @@ public class ReviewOfficerService extends BaseService<ReviewOfficerMapper, Revie
public Ret checkEnd(String id, User loginUser) { public Ret checkEnd(String id, User loginUser) {
ReviewOfficer reviewOfficer = getById(id); ReviewOfficer reviewOfficer = getById(id);
Assert.notNull(reviewOfficer, "未找到该记录"); Assert.notNull(reviewOfficer, "未找到该记录");
if (ReviewOfficer.STATE_CHECK != reviewOfficer.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息")); if (ReviewOfficer.STATE_CHECK != reviewOfficer.getState())
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
if (!loginUser.getId().equals(reviewOfficer.getCreatedId())) return Ret.fail("您不是创建人,不能操作"); if (!loginUser.getId().equals(reviewOfficer.getCreatedId())) return Ret.fail("您不是创建人,不能操作");
reviewOfficer.setState(ReviewOfficer.STATE_OPINION); reviewOfficer.setState(ReviewOfficer.STATE_OPINION);
boolean flag = saveOrUpdate(reviewOfficer); boolean flag = saveOrUpdate(reviewOfficer);
@ -243,24 +254,31 @@ public class ReviewOfficerService extends BaseService<ReviewOfficerMapper, Revie
public ReviewOfficer stateOpinionSave(ReviewOfficerOpinionStateRequest reviewOfficerOpinionStateRequest, User loginUser) { public ReviewOfficer stateOpinionSave(ReviewOfficerOpinionStateRequest reviewOfficerOpinionStateRequest, User loginUser) {
ReviewOfficer reviewOfficer = getById(reviewOfficerOpinionStateRequest.getReviewId()); ReviewOfficer reviewOfficer = getById(reviewOfficerOpinionStateRequest.getReviewId());
Assert.notNull(reviewOfficer, "未找到该记录"); Assert.notNull(reviewOfficer, "未找到该记录");
if (ReviewOfficer.STATE_OPINION != reviewOfficer.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息")); if (ReviewOfficer.STATE_OPINION != reviewOfficer.getState())
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(reviewOfficerOpinionStateRequest, reviewOfficer); BeanUtil.copyProperties(reviewOfficerOpinionStateRequest, reviewOfficer);
reviewOfficer.setState(ReviewOfficer.STATE_RESULT); reviewOfficer.setState(ReviewOfficer.STATE_RESULT);
saveOrUpdate(reviewOfficer); saveOrUpdate(reviewOfficer);
saveReviewOfficerAttachment(reviewOfficer.getId(), reviewOfficerOpinionStateRequest.getOpinionAttachmentName(), reviewOfficerOpinionStateRequest.getOpinionAttachmentPath(), loginUser, ReviewOfficer.STATE_OPINION); saveReviewOfficerAttachment(reviewOfficer.getId(),
reviewOfficerOpinionStateRequest.getOpinionAttachmentName(),
reviewOfficerOpinionStateRequest.getOpinionAttachmentPath(), loginUser, ReviewOfficer.STATE_OPINION,
reviewOfficerOpinionStateRequest.getOpinionAttachmentConferenceId(), reviewOfficerOpinionStateRequest.getOpinionAttachmentConferenceName());
return reviewOfficer; return reviewOfficer;
} }
public ReviewOfficer stateResultSave(ReviewOfficerResultStateRequest reviewOfficerResultStateRequest, User loginUser) { public ReviewOfficer stateResultSave(ReviewOfficerResultStateRequest reviewOfficerResultStateRequest, User loginUser) {
ReviewOfficer reviewOfficer = getById(reviewOfficerResultStateRequest.getReviewId()); ReviewOfficer reviewOfficer = getById(reviewOfficerResultStateRequest.getReviewId());
Assert.notNull(reviewOfficer, "未找到该记录"); Assert.notNull(reviewOfficer, "未找到该记录");
if (ReviewOfficer.STATE_RESULT != reviewOfficer.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息")); if (ReviewOfficer.STATE_RESULT != reviewOfficer.getState())
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(reviewOfficerResultStateRequest, reviewOfficer); BeanUtil.copyProperties(reviewOfficerResultStateRequest, reviewOfficer);
reviewOfficer.setState(ReviewOfficer.STATE_PUBLIC); reviewOfficer.setState(ReviewOfficer.STATE_PUBLIC);
saveOrUpdate(reviewOfficer); saveOrUpdate(reviewOfficer);
saveReviewOfficerAttachment(reviewOfficer.getId(), reviewOfficerResultStateRequest.getResultAttachmentName(), reviewOfficerResultStateRequest.getResultAttachmentPath(), loginUser, ReviewOfficer.STATE_RESULT); saveReviewOfficerAttachment(reviewOfficer.getId(), reviewOfficerResultStateRequest.getResultAttachmentName(),
reviewOfficerResultStateRequest.getResultAttachmentPath(), loginUser, ReviewOfficer.STATE_RESULT,
reviewOfficerResultStateRequest.getResultAttachmentConferenceId(), reviewOfficerResultStateRequest.getResultAttachmentConferenceName());
return reviewOfficer; return reviewOfficer;
} }
@ -282,7 +300,7 @@ public class ReviewOfficerService extends BaseService<ReviewOfficerMapper, Revie
List<String> userIdList = Arrays.asList(userIds.split(",")); List<String> userIdList = Arrays.asList(userIds.split(","));
List<ReviewOfficerUser> userList = new ArrayList<>(); List<ReviewOfficerUser> userList = new ArrayList<>();
Iterator<String> iterator = userIdList.iterator(); Iterator<String> iterator = userIdList.iterator();
while(iterator.hasNext()){ while (iterator.hasNext()) {
String userId = iterator.next(); String userId = iterator.next();
//1.已存在的不管 //1.已存在的不管
int count = reviewOfficerUserService.count(new LambdaQueryWrapper<ReviewOfficerUser>() int count = reviewOfficerUserService.count(new LambdaQueryWrapper<ReviewOfficerUser>()
@ -393,6 +411,9 @@ public class ReviewOfficerService extends BaseService<ReviewOfficerMapper, Revie
item.setType(state); item.setType(state);
item.setCreatedId(loginUser.getId()); item.setCreatedId(loginUser.getId());
item.setCreatedAt(LocalDateTime.now()); item.setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(item.getConferenceId())) {
conferenceAttachmentService.associationMeeting(item.getConferenceId(), item.getAttachment(), item.getTitle(), "两官评议附件", loginUser.getId());
}
}); });
reviewOfficerAttachmentService.saveBatch(reviewAttachmentList); reviewOfficerAttachmentService.saveBatch(reviewAttachmentList);
} }
@ -405,21 +426,27 @@ public class ReviewOfficerService extends BaseService<ReviewOfficerMapper, Revie
* @param loginUser * @param loginUser
* @param state * @param state
*/ */
private void saveReviewOfficerAttachment(String reviewId, String attachmentName, String attachmentPath, User loginUser, Integer state) { private void saveReviewOfficerAttachment(String reviewId, String attachmentName, String attachmentPath, User loginUser, Integer state, String conferenceId, String conferenceName) {
reviewOfficerAttachmentService.remove(new LambdaQueryWrapper<ReviewOfficerAttachment>() reviewOfficerAttachmentService.remove(new LambdaQueryWrapper<ReviewOfficerAttachment>()
.eq(ReviewOfficerAttachment::getReviewId, reviewId) .eq(ReviewOfficerAttachment::getReviewId, reviewId)
.eq(ReviewOfficerAttachment::getType, state)); .eq(ReviewOfficerAttachment::getType, state));
if (StrUtil.isNotBlank(attachmentName)) { if (StrUtil.isNotBlank(attachmentName)) {
String[] nameArr = attachmentName.split(","); String[] nameArr = attachmentName.split(",");
String[] pathArr = attachmentPath.split(","); String[] pathArr = attachmentPath.split(",");
String[] conferenceIdArr = conferenceId.split(",");
String[] conferenceNameArr = conferenceName.split(",");
for (int i = 0; i < nameArr.length; i++) { for (int i = 0; i < nameArr.length; i++) {
ReviewOfficerAttachment reviewAttachment = new ReviewOfficerAttachment(); ReviewOfficerAttachment reviewAttachment = new ReviewOfficerAttachment();
reviewAttachment.setType(state) reviewAttachment.setType(state)
.setReviewId(reviewId) .setReviewId(reviewId).setConferenceId(conferenceIdArr[i])
.setConferenceName(conferenceNameArr[i])
.setTitle(nameArr[i]) .setTitle(nameArr[i])
.setAttachment(pathArr[i]) .setAttachment(pathArr[i])
.setCreatedId(loginUser.getId()) .setCreatedId(loginUser.getId())
.setCreatedAt(LocalDateTime.now()); .setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(conferenceIdArr[i])) {
conferenceAttachmentService.associationMeeting(conferenceIdArr[i], conferenceNameArr[i], nameArr[i], "两官评议附件", loginUser.getId());
}
reviewOfficerAttachmentService.save(reviewAttachment); reviewOfficerAttachmentService.save(reviewAttachment);
} }
} }

View File

@ -56,6 +56,9 @@ public class ReviewSubjectService extends BaseService<ReviewSubjectMapper, Revie
@Autowired @Autowired
UserService userService; UserService userService;
@Autowired
ConferenceAttachmentService conferenceAttachmentService;
/*后台*/ /*后台*/
@Transactional @Transactional
public boolean del(String id) { public boolean del(String id) {
@ -140,7 +143,11 @@ public class ReviewSubjectService extends BaseService<ReviewSubjectMapper, Revie
reviewSubject.setStatus(0); reviewSubject.setStatus(0);
reviewSubject.setCreatedId(loginUser.getId()); reviewSubject.setCreatedId(loginUser.getId());
saveOrUpdate(reviewSubject); saveOrUpdate(reviewSubject);
saveReviewSubjectAttachment(reviewSubject.getId(), reviewSubjectInReportStateRequest.getInReportAttachmentName(), reviewSubjectInReportStateRequest.getInReportAttachmentPath(), loginUser, ReviewSubject.STATE_IN_REPORT); saveReviewSubjectAttachment(reviewSubject.getId(),
reviewSubjectInReportStateRequest.getInReportAttachmentName(),
reviewSubjectInReportStateRequest.getInReportAttachmentPath(), loginUser,
ReviewSubject.STATE_IN_REPORT, reviewSubjectInReportStateRequest.getInReportAttachmentConferenceId(),
reviewSubjectInReportStateRequest.getInReportAttachmentConferenceName());
saveReviewSubjectAudit(reviewSubject.getId(), reviewSubjectInReportStateRequest.getInReportAudit1Ids(), loginUser, 1); saveReviewSubjectAudit(reviewSubject.getId(), reviewSubjectInReportStateRequest.getInReportAudit1Ids(), loginUser, 1);
saveReviewSubjectAudit(reviewSubject.getId(), reviewSubjectInReportStateRequest.getInReportAudit2Ids(), loginUser, 2); saveReviewSubjectAudit(reviewSubject.getId(), reviewSubjectInReportStateRequest.getInReportAudit2Ids(), loginUser, 2);
return reviewSubject; return reviewSubject;
@ -201,7 +208,10 @@ public class ReviewSubjectService extends BaseService<ReviewSubjectMapper, Revie
BeanUtil.copyProperties(reviewSubjectCheckStateRequest, reviewSubject); BeanUtil.copyProperties(reviewSubjectCheckStateRequest, reviewSubject);
saveOrUpdate(reviewSubject); saveOrUpdate(reviewSubject);
saveReviewSubjectAttachment(reviewSubject.getId(), reviewSubjectCheckStateRequest.getCheckAttachmentName(), reviewSubjectCheckStateRequest.getCheckAttachmentPath(), loginUser, ReviewSubject.STATE_CHECK); saveReviewSubjectAttachment(reviewSubject.getId(),
reviewSubjectCheckStateRequest.getCheckAttachmentName(),
reviewSubjectCheckStateRequest.getCheckAttachmentPath(), loginUser, ReviewSubject.STATE_CHECK,
reviewSubjectCheckStateRequest.getCheckAttachmentConferenceId(), reviewSubjectCheckStateRequest.getCheckAttachmentConferenceName());
saveReviewSubjectUser(reviewSubject.getId(), reviewSubjectCheckStateRequest.getCheckUserIds(), loginUser); saveReviewSubjectUser(reviewSubject.getId(), reviewSubjectCheckStateRequest.getCheckUserIds(), loginUser);
return reviewSubject; return reviewSubject;
} }
@ -248,7 +258,10 @@ public class ReviewSubjectService extends BaseService<ReviewSubjectMapper, Revie
reviewSubject.setState(ReviewSubject.STATE_RESULT); reviewSubject.setState(ReviewSubject.STATE_RESULT);
saveOrUpdate(reviewSubject); saveOrUpdate(reviewSubject);
saveReviewSubjectAttachment(reviewSubject.getId(), reviewSubjectOpinionStateRequest.getOpinionAttachmentName(), reviewSubjectOpinionStateRequest.getOpinionAttachmentPath(), loginUser, ReviewSubject.STATE_OPINION); saveReviewSubjectAttachment(reviewSubject.getId(),
reviewSubjectOpinionStateRequest.getOpinionAttachmentName(),
reviewSubjectOpinionStateRequest.getOpinionAttachmentPath(), loginUser, ReviewSubject.STATE_OPINION,
reviewSubjectOpinionStateRequest.getOpinionAttachmentConferenceId(), reviewSubjectOpinionStateRequest.getOpinionAttachmentConferenceName());
return reviewSubject; return reviewSubject;
} }
@ -260,7 +273,9 @@ public class ReviewSubjectService extends BaseService<ReviewSubjectMapper, Revie
reviewSubject.setState(ReviewSubject.STATE_PUBLIC); reviewSubject.setState(ReviewSubject.STATE_PUBLIC);
saveOrUpdate(reviewSubject); saveOrUpdate(reviewSubject);
saveReviewSubjectAttachment(reviewSubject.getId(), reviewSubjectResultStateRequest.getResultAttachmentName(), reviewSubjectResultStateRequest.getResultAttachmentPath(), loginUser, ReviewSubject.STATE_RESULT); saveReviewSubjectAttachment(reviewSubject.getId(), reviewSubjectResultStateRequest.getResultAttachmentName(), reviewSubjectResultStateRequest.getResultAttachmentPath(),
loginUser, ReviewSubject.STATE_RESULT,
reviewSubjectResultStateRequest.getResultAttachmentConferenceId(), reviewSubjectResultStateRequest.getResultAttachmentConferenceName());
return reviewSubject; return reviewSubject;
} }
@ -393,6 +408,9 @@ public class ReviewSubjectService extends BaseService<ReviewSubjectMapper, Revie
item.setType(state); item.setType(state);
item.setCreatedId(loginUser.getId()); item.setCreatedId(loginUser.getId());
item.setCreatedAt(LocalDateTime.now()); item.setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(item.getConferenceId())) {
conferenceAttachmentService.associationMeeting(item.getConferenceId(), item.getAttachment(), item.getTitle(), "专题评议附件", loginUser.getId());
}
}); });
reviewSubjectAttachmentService.saveBatch(reviewAttachmentList); reviewSubjectAttachmentService.saveBatch(reviewAttachmentList);
} }
@ -405,21 +423,31 @@ public class ReviewSubjectService extends BaseService<ReviewSubjectMapper, Revie
* @param loginUser * @param loginUser
* @param state * @param state
*/ */
private void saveReviewSubjectAttachment(String reviewId, String attachmentName, String attachmentPath, User loginUser, Integer state) { private void saveReviewSubjectAttachment(String reviewId,
String attachmentName,
String attachmentPath, User loginUser, Integer state,
String conferenceId
, String conferenceName) {
reviewSubjectAttachmentService.remove(new LambdaQueryWrapper<ReviewSubjectAttachment>() reviewSubjectAttachmentService.remove(new LambdaQueryWrapper<ReviewSubjectAttachment>()
.eq(ReviewSubjectAttachment::getReviewId, reviewId) .eq(ReviewSubjectAttachment::getReviewId, reviewId)
.eq(ReviewSubjectAttachment::getType, state)); .eq(ReviewSubjectAttachment::getType, state));
if (StrUtil.isNotBlank(attachmentName)) { if (StrUtil.isNotBlank(attachmentName)) {
String[] nameArr = attachmentName.split(","); String[] nameArr = attachmentName.split(",");
String[] pathArr = attachmentPath.split(","); String[] pathArr = attachmentPath.split(",");
String[] conferenceIdArr = conferenceId.split(",");
String[] conferenceNameArr = conferenceName.split(",");
for (int i = 0; i < nameArr.length; i++) { for (int i = 0; i < nameArr.length; i++) {
ReviewSubjectAttachment reviewAttachment = new ReviewSubjectAttachment(); ReviewSubjectAttachment reviewAttachment = new ReviewSubjectAttachment();
reviewAttachment.setType(state) reviewAttachment.setType(state)
.setReviewId(reviewId) .setReviewId(reviewId)
.setTitle(nameArr[i]) .setTitle(nameArr[i]).setConferenceId(conferenceIdArr[i])
.setConferenceName(conferenceNameArr[i])
.setAttachment(pathArr[i]) .setAttachment(pathArr[i])
.setCreatedId(loginUser.getId()) .setCreatedId(loginUser.getId())
.setCreatedAt(LocalDateTime.now()); .setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(conferenceIdArr[i])) {
conferenceAttachmentService.associationMeeting(conferenceIdArr[i], conferenceNameArr[i], nameArr[i], "专题评议附件", loginUser.getId());
}
reviewSubjectAttachmentService.save(reviewAttachment); reviewSubjectAttachmentService.save(reviewAttachment);
} }
} }

View File

@ -54,6 +54,9 @@ public class ReviewSuperviseService extends BaseService<ReviewSuperviseMapper, R
@Autowired @Autowired
UserService userService; UserService userService;
@Autowired
ConferenceAttachmentService conferenceAttachmentService;
/*后台*/ /*后台*/
@Transactional @Transactional
public Ret adminSaveOrUpdate(ReviewSuperviseBo reviewSuperviseBo, User loginUser) { public Ret adminSaveOrUpdate(ReviewSuperviseBo reviewSuperviseBo, User loginUser) {
@ -156,8 +159,10 @@ public class ReviewSuperviseService extends BaseService<ReviewSuperviseMapper, R
reviewSupervise.setState(ReviewSupervise.STATE_TAIL); reviewSupervise.setState(ReviewSupervise.STATE_TAIL);
reviewSupervise.setUpdatedId(loginUser.getId()); reviewSupervise.setUpdatedId(loginUser.getId());
saveOrUpdate(reviewSupervise); saveOrUpdate(reviewSupervise);
saveAttachment(reviewSupervise.getId(), request.getSurveyAttachmentName(), request.getSurveyAttachmentPath(), loginUser, ReviewSuperviseAttachment.TYPE_SURVEY); saveAttachment(reviewSupervise.getId(), request.getSurveyAttachmentName(), request.getSurveyAttachmentPath(),
saveAttachment(reviewSupervise.getId(), request.getReviewAttachmentName(), request.getReviewAttachmentPath(), loginUser, ReviewSuperviseAttachment.TYPE_REVIEW); loginUser, ReviewSuperviseAttachment.TYPE_SURVEY, request.getSurveyAttachmentConferenceId(), request.getSurveyAttachmentConferenceName());
saveAttachment(reviewSupervise.getId(), request.getReviewAttachmentName(), request.getReviewAttachmentPath(),
loginUser, ReviewSuperviseAttachment.TYPE_REVIEW,request.getReviewAttachmentConferenceId(), request.getSurveyAttachmentConferenceName());
return reviewSupervise; return reviewSupervise;
} }
@ -171,8 +176,11 @@ public class ReviewSuperviseService extends BaseService<ReviewSuperviseMapper, R
reviewSupervise.setState(ReviewSupervise.STATE_EVALUATE); reviewSupervise.setState(ReviewSupervise.STATE_EVALUATE);
reviewSupervise.setUpdatedId(loginUser.getId()); reviewSupervise.setUpdatedId(loginUser.getId());
saveOrUpdate(reviewSupervise); saveOrUpdate(reviewSupervise);
saveAttachment(reviewSupervise.getId(), request.getTailAttachmentName(), request.getTailAttachmentPath(), loginUser, ReviewSuperviseAttachment.TYPE_TAIL); saveAttachment(reviewSupervise.getId(), request.getTailAttachmentName(), request.getTailAttachmentPath(),
saveAttachment(reviewSupervise.getId(), request.getResearchAttachmentName(), request.getResearchAttachmentPath(), loginUser, ReviewSuperviseAttachment.TYPE_RESEARCH); loginUser, ReviewSuperviseAttachment.TYPE_TAIL,request.getTailAttachmentConferenceId(),request.getTailAttachmentConferenceName());
saveAttachment(reviewSupervise.getId(), request.getResearchAttachmentName(),
request.getResearchAttachmentPath(), loginUser, ReviewSuperviseAttachment.TYPE_RESEARCH,
request.getResearchAttachmentConferenceId(),request.getResearchAttachmentConferenceName());
return reviewSupervise; return reviewSupervise;
} }
@ -185,7 +193,9 @@ public class ReviewSuperviseService extends BaseService<ReviewSuperviseMapper, R
BeanUtil.copyProperties(request, reviewSupervise); BeanUtil.copyProperties(request, reviewSupervise);
reviewSupervise.setUpdatedId(loginUser.getId()); reviewSupervise.setUpdatedId(loginUser.getId());
saveOrUpdate(reviewSupervise); saveOrUpdate(reviewSupervise);
saveAttachment(reviewSupervise.getId(), request.getReviewAttachmentName(), request.getReviewAttachmentPath(), loginUser, ReviewSuperviseAttachment.TYPE_EVALUATE); saveAttachment(reviewSupervise.getId(), request.getReviewAttachmentName(), request.getReviewAttachmentPath(),
loginUser, ReviewSuperviseAttachment.TYPE_EVALUATE,request.getReviewAttachmentConferenceId(),
request.getReviewAttachmentConferenceName());
saveUser(reviewSupervise.getId(), request.getEvaluateUserIds(), loginUser, ReviewSuperviseUser.TYPE_EVALUATE); saveUser(reviewSupervise.getId(), request.getEvaluateUserIds(), loginUser, ReviewSuperviseUser.TYPE_EVALUATE);
return reviewSupervise; return reviewSupervise;
} }
@ -257,6 +267,9 @@ public class ReviewSuperviseService extends BaseService<ReviewSuperviseMapper, R
item.setType(type); item.setType(type);
item.setCreatedId(loginUser.getId()); item.setCreatedId(loginUser.getId());
item.setCreatedAt(LocalDateTime.now()); item.setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(item.getConferenceId())) {
conferenceAttachmentService.associationMeeting(item.getConferenceId(), item.getAttachment(), item.getTitle(), "审议督政附件", loginUser.getId());
}
}); });
reviewSuperviseAttachmentService.saveBatch(attachmentList); reviewSuperviseAttachmentService.saveBatch(attachmentList);
} }
@ -269,14 +282,22 @@ public class ReviewSuperviseService extends BaseService<ReviewSuperviseMapper, R
* @param loginUser * @param loginUser
* @param type * @param type
*/ */
private void saveAttachment(String reviewSuperviseId, String attachmentName, String attachmentPath, User loginUser, String type) { private void saveAttachment(String reviewSuperviseId, String attachmentName, String attachmentPath, User loginUser, String type,
String conferenceId
, String conferenceName) {
reviewSuperviseAttachmentService.remove(new LambdaQueryWrapper<ReviewSuperviseAttachment>().eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSuperviseId).eq(ReviewSuperviseAttachment::getType, type)); reviewSuperviseAttachmentService.remove(new LambdaQueryWrapper<ReviewSuperviseAttachment>().eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSuperviseId).eq(ReviewSuperviseAttachment::getType, type));
if (StrUtil.isNotBlank(attachmentName)) { if (StrUtil.isNotBlank(attachmentName)) {
String[] nameArr = attachmentName.split(","); String[] nameArr = attachmentName.split(",");
String[] pathArr = attachmentPath.split(","); String[] pathArr = attachmentPath.split(",");
String[] conferenceIdArr = conferenceId.split(",");
String[] conferenceNameArr = conferenceName.split(",");
for (int i = 0; i < nameArr.length; i++) { for (int i = 0; i < nameArr.length; i++) {
ReviewSuperviseAttachment reviewSuperviseAttachment = new ReviewSuperviseAttachment(); ReviewSuperviseAttachment reviewSuperviseAttachment = new ReviewSuperviseAttachment();
reviewSuperviseAttachment.setType(type).setReviewSuperviseId(reviewSuperviseId).setTitle(nameArr[i]).setAttachment(pathArr[i]).setCreatedId(loginUser.getId()).setCreatedAt(LocalDateTime.now()); reviewSuperviseAttachment.setType(type).setConferenceId(conferenceIdArr[i])
.setConferenceName(conferenceNameArr[i]).setReviewSuperviseId(reviewSuperviseId).setTitle(nameArr[i]).setAttachment(pathArr[i]).setCreatedId(loginUser.getId()).setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(conferenceIdArr[i])) {
conferenceAttachmentService.associationMeeting(conferenceIdArr[i], conferenceNameArr[i], nameArr[i], "审议督政附件", loginUser.getId());
}
reviewSuperviseAttachmentService.save(reviewSuperviseAttachment); reviewSuperviseAttachmentService.save(reviewSuperviseAttachment);
} }
} }

View File

@ -53,6 +53,9 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
@Autowired @Autowired
ReviewWorkUserService reviewWorkUserService; ReviewWorkUserService reviewWorkUserService;
@Autowired
ConferenceAttachmentService conferenceAttachmentService;
@Autowired @Autowired
UserService userService; UserService userService;
@ -140,7 +143,9 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
reviewWork.setStatus(0); reviewWork.setStatus(0);
reviewWork.setCreatedId(loginUser.getId()); reviewWork.setCreatedId(loginUser.getId());
saveOrUpdate(reviewWork); saveOrUpdate(reviewWork);
saveReviewWorkAttachment(reviewWork.getId(), reviewWorkInReportStateRequest.getInReportAttachmentName(), reviewWorkInReportStateRequest.getInReportAttachmentPath(), loginUser, ReviewWork.STATE_IN_REPORT); saveReviewWorkAttachment(reviewWork.getId(), reviewWorkInReportStateRequest.getInReportAttachmentName(),
reviewWorkInReportStateRequest.getInReportAttachmentPath(), loginUser, ReviewWork.STATE_IN_REPORT,
reviewWorkInReportStateRequest.getInReportAttachmentConferenceId(), reviewWorkInReportStateRequest.getInReportAttachmentConferenceName());
saveReviewWorkAudit(reviewWork.getId(), reviewWorkInReportStateRequest.getInReportAudit1Ids(), loginUser, 1); saveReviewWorkAudit(reviewWork.getId(), reviewWorkInReportStateRequest.getInReportAudit1Ids(), loginUser, 1);
saveReviewWorkAudit(reviewWork.getId(), reviewWorkInReportStateRequest.getInReportAudit2Ids(), loginUser, 2); saveReviewWorkAudit(reviewWork.getId(), reviewWorkInReportStateRequest.getInReportAudit2Ids(), loginUser, 2);
return reviewWork; return reviewWork;
@ -201,7 +206,9 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
BeanUtil.copyProperties(reviewWorkCheckStateRequest, reviewWork); BeanUtil.copyProperties(reviewWorkCheckStateRequest, reviewWork);
saveOrUpdate(reviewWork); saveOrUpdate(reviewWork);
saveReviewWorkAttachment(reviewWork.getId(), reviewWorkCheckStateRequest.getCheckAttachmentName(), reviewWorkCheckStateRequest.getCheckAttachmentPath(), loginUser, ReviewWork.STATE_CHECK); saveReviewWorkAttachment(reviewWork.getId(), reviewWorkCheckStateRequest.getCheckAttachmentName(),
reviewWorkCheckStateRequest.getCheckAttachmentPath(), loginUser, ReviewWork.STATE_CHECK,
reviewWorkCheckStateRequest.getCheckAttachmentConferenceId(), reviewWorkCheckStateRequest.getCheckAttachmentConferenceName());
saveReviewWorkUser(reviewWork.getId(), reviewWorkCheckStateRequest.getCheckUserIds(), loginUser); saveReviewWorkUser(reviewWork.getId(), reviewWorkCheckStateRequest.getCheckUserIds(), loginUser);
return reviewWork; return reviewWork;
} }
@ -248,7 +255,9 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
reviewWork.setState(ReviewWork.STATE_RESULT); reviewWork.setState(ReviewWork.STATE_RESULT);
saveOrUpdate(reviewWork); saveOrUpdate(reviewWork);
saveReviewWorkAttachment(reviewWork.getId(), reviewWorkOpinionStateRequest.getOpinionAttachmentName(), reviewWorkOpinionStateRequest.getOpinionAttachmentPath(), loginUser, ReviewWork.STATE_OPINION); saveReviewWorkAttachment(reviewWork.getId(), reviewWorkOpinionStateRequest.getOpinionAttachmentName(),
reviewWorkOpinionStateRequest.getOpinionAttachmentPath(), loginUser, ReviewWork.STATE_OPINION,
reviewWorkOpinionStateRequest.getOpinionAttachmentConferenceId(), reviewWorkOpinionStateRequest.getOpinionAttachmentConferenceName());
return reviewWork; return reviewWork;
} }
@ -260,7 +269,9 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
reviewWork.setState(ReviewWork.STATE_PUBLIC); reviewWork.setState(ReviewWork.STATE_PUBLIC);
saveOrUpdate(reviewWork); saveOrUpdate(reviewWork);
saveReviewWorkAttachment(reviewWork.getId(), reviewWorkResultStateRequest.getResultAttachmentName(), reviewWorkResultStateRequest.getResultAttachmentPath(), loginUser, ReviewWork.STATE_RESULT); saveReviewWorkAttachment(reviewWork.getId(), reviewWorkResultStateRequest.getResultAttachmentName(),
reviewWorkResultStateRequest.getResultAttachmentPath(), loginUser, ReviewWork.STATE_RESULT,
reviewWorkResultStateRequest.getResultAttachmentConferenceId(), reviewWorkResultStateRequest.getResultAttachmentConferenceName());
return reviewWork; return reviewWork;
} }
@ -393,6 +404,9 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
item.setType(state); item.setType(state);
item.setCreatedId(loginUser.getId()); item.setCreatedId(loginUser.getId());
item.setCreatedAt(LocalDateTime.now()); item.setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(item.getConferenceId())) {
conferenceAttachmentService.associationMeeting(item.getConferenceId(), item.getAttachment(), item.getTitle(), "工作评议附件", loginUser.getId());
}
}); });
reviewWorkAttachmentService.saveBatch(reviewAttachmentList); reviewWorkAttachmentService.saveBatch(reviewAttachmentList);
} }
@ -405,22 +419,30 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
* @param loginUser * @param loginUser
* @param state * @param state
*/ */
private void saveReviewWorkAttachment(String reviewId, String attachmentName, String attachmentPath, User loginUser, Integer state) { private void saveReviewWorkAttachment(String reviewId, String attachmentName, String attachmentPath,
User loginUser, Integer state,String conferenceId
, String conferenceName) {
reviewWorkAttachmentService.remove(new LambdaQueryWrapper<ReviewWorkAttachment>() reviewWorkAttachmentService.remove(new LambdaQueryWrapper<ReviewWorkAttachment>()
.eq(ReviewWorkAttachment::getReviewId, reviewId) .eq(ReviewWorkAttachment::getReviewId, reviewId)
.eq(ReviewWorkAttachment::getType, state)); .eq(ReviewWorkAttachment::getType, state));
if (StrUtil.isNotBlank(attachmentName)) { if (StrUtil.isNotBlank(attachmentName)) {
String[] nameArr = attachmentName.split(","); String[] nameArr = attachmentName.split(",");
String[] pathArr = attachmentPath.split(","); String[] pathArr = attachmentPath.split(",");
String[] conferenceIdArr = conferenceId.split(",");
String[] conferenceNameArr = conferenceName.split(",");
for (int i = 0; i < nameArr.length; i++) { for (int i = 0; i < nameArr.length; i++) {
ReviewWorkAttachment reviewAttachment = new ReviewWorkAttachment(); ReviewWorkAttachment reviewAttachment = new ReviewWorkAttachment();
reviewAttachment.setType(state) reviewAttachment.setType(state).setConferenceId(conferenceIdArr[i])
.setConferenceName(conferenceNameArr[i])
.setReviewId(reviewId) .setReviewId(reviewId)
.setTitle(nameArr[i]) .setTitle(nameArr[i])
.setAttachment(pathArr[i]) .setAttachment(pathArr[i])
.setCreatedId(loginUser.getId()) .setCreatedId(loginUser.getId())
.setCreatedAt(LocalDateTime.now()); .setCreatedAt(LocalDateTime.now());
reviewWorkAttachmentService.save(reviewAttachment); reviewWorkAttachmentService.save(reviewAttachment);
if (StrUtil.isNotBlank(conferenceIdArr[i])) {
conferenceAttachmentService.associationMeeting(conferenceIdArr[i], conferenceNameArr[i], nameArr[i], "工作评议附件", loginUser.getId());
}
} }
} }
} }