add 标协会议增加【标准项目】面板
This commit is contained in:
+11
-1
@@ -94,4 +94,14 @@ SELECT
|
||||
( SELECT DATE_FORMAT( payment_date, '%Y' ) FROM pay_confirm_payment_record p3 WHERE p3.project_id = p1.id LIMIT 1 ) AS payment_year
|
||||
FROM
|
||||
pay_meeting_situation p1
|
||||
LEFT JOIN pay_meeting p2 ON p1.meeting_id = p2.id;
|
||||
LEFT JOIN pay_meeting p2 ON p1.meeting_id = p2.id;
|
||||
|
||||
INSERT INTO sys_dict ( id, dict_name, dict_code, description, del_flag, create_by, create_time ) VALUES ( '1767759337591001089', '标准类型', 'standard_type', '(强/推/行/团/地)', 0, 'LKGLZ', '2024-03-13 11:47:24' );
|
||||
INSERT INTO sys_dict_item ( id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time ) VALUES ( '1767759519305027585', '1767759337591001089', '强', '1', '', 1, 1, 'LKGLZ', '2024-03-13 11:48:07' );
|
||||
INSERT INTO sys_dict_item ( id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time ) VALUES ( '1767759572883066882', '1767759337591001089', '推', '2', '', 2, 1, 'LKGLZ', '2024-03-13 11:48:20' );
|
||||
INSERT INTO sys_dict_item ( id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time ) VALUES ( '1767759602968809474', '1767759337591001089', '行', '3', '', 3, 1, 'LKGLZ', '2024-03-13 11:48:27' );
|
||||
INSERT INTO sys_dict_item ( id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time ) VALUES ( '1767759630173065218', '1767759337591001089', '团', '4', '', 4, 1, 'LKGLZ', '2024-03-13 11:48:33' );
|
||||
INSERT INTO sys_dict_item ( id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time ) VALUES ( '1767759654927847426', '1767759337591001089', '地', '5', '', 5, 1, 'LKGLZ', '2024-03-13 11:48:39' );
|
||||
INSERT INTO sys_dict ( id, dict_name, dict_code, description, del_flag, create_by, create_time ) VALUES ( '1767760166330945537', '制修订', 'preparation_and_revision', '(制定/修订)', 0, 'LKGLZ', '2024-03-13 11:50:41' );
|
||||
INSERT INTO sys_dict_item ( id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time ) VALUES ( '1767760194743160834', '1767760166330945537', '制定', '1', '', 1, 1, 'LKGLZ', '2024-03-13 11:50:48' );
|
||||
INSERT INTO sys_dict_item ( id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time ) VALUES ( '1767760221213413378', '1767760166330945537', '修订', '2', '', 2, 1, 'LKGLZ', '2024-03-13 11:50:54' );
|
||||
+9
@@ -16,9 +16,11 @@ import com.jero.meeting.common.MeetingCommon;
|
||||
import com.jero.meeting.entity.PayMeeting;
|
||||
import com.jero.meeting.entity.PayMeetingHotelContacts;
|
||||
import com.jero.meeting.entity.PayMeetingStandard;
|
||||
import com.jero.meeting.entity.PayMeetingStandardProject;
|
||||
import com.jero.meeting.service.IPayMeetingHotelContactsService;
|
||||
import com.jero.meeting.service.IPayMeetingService;
|
||||
import com.jero.meeting.service.IPayMeetingStandardService;
|
||||
import com.jero.meeting.service.PayMeetingStandardProjectService;
|
||||
import com.jero.meeting.vo.PayMeetingVO;
|
||||
import com.jero.meeting.vo.PublishReminderVO;
|
||||
import com.jero.meeting.vo.UploadFileVO;
|
||||
@@ -71,6 +73,8 @@ public class StandardsMeetingController extends JeroController<PayMeeting, IPayM
|
||||
private IPayContactsManagementService payContactsManagementService;
|
||||
@Resource
|
||||
private IPayMeetingStandardService payMeetingStandardService;
|
||||
@Resource
|
||||
private PayMeetingStandardProjectService meetingStandardProjectService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@@ -235,6 +239,11 @@ public class StandardsMeetingController extends JeroController<PayMeeting, IPayM
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
|
||||
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
|
||||
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
|
||||
//查询标协项目
|
||||
LambdaQueryWrapper<PayMeetingStandardProject> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayMeetingStandardProject::getMeetingId, id);
|
||||
List<PayMeetingStandardProject> standardProjectList = meetingStandardProjectService.list(queryWrapper);
|
||||
payMeetingVO.setStandardProjectList(standardProjectList);
|
||||
//标协会议类型
|
||||
//String tbMeetingType = meeting.getTbMeetingType().toString();
|
||||
//String type = sysBaseAPI.translateDict("standard_meeting_type", tbMeetingType);
|
||||
|
||||
@@ -414,4 +414,10 @@ public class PayMeeting implements Serializable {
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<PayMeetingSituation> situationList;
|
||||
|
||||
/**
|
||||
* 标准项目列表
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<PayMeetingStandardProject> payMeetingStandardProjectList;
|
||||
}
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
package com.jero.meeting.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 会议标准项目
|
||||
*
|
||||
* @author liJiaRao
|
||||
* @date 2024-03-13 11:16
|
||||
*/
|
||||
@ApiModel(description = "会议标准项目")
|
||||
@Data
|
||||
@TableName(value = "pay_meeting_standard_project")
|
||||
public class PayMeetingStandardProject {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 会议id
|
||||
*/
|
||||
@TableField(value = "meeting_id")
|
||||
@ApiModelProperty(value = "会议id")
|
||||
private String meetingId;
|
||||
|
||||
/**
|
||||
* 标准编号
|
||||
*/
|
||||
@TableField(value = "standard_no")
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private String standardNo;
|
||||
|
||||
/**
|
||||
* 标准名称
|
||||
*/
|
||||
@TableField(value = "standard_name")
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
private String standardName;
|
||||
|
||||
/**
|
||||
* 标准类型(强/推/行/团/地)
|
||||
*/
|
||||
@TableField(value = "standard_type")
|
||||
@ApiModelProperty(value = "标准类型(强/推/行/团/地)")
|
||||
private Integer standardType;
|
||||
|
||||
/**
|
||||
* 制修订(制定/修订)
|
||||
*/
|
||||
@TableField(value = "preparation_and_revision")
|
||||
@ApiModelProperty(value = "制修订(制定/修订)")
|
||||
private Integer preparationAndRevision;
|
||||
|
||||
/**
|
||||
* 宣贯人
|
||||
*/
|
||||
@TableField(value = "promoter")
|
||||
@ApiModelProperty(value = "宣贯人")
|
||||
private String promoter;
|
||||
|
||||
/**
|
||||
* 宣贯时间(年月)
|
||||
*/
|
||||
@TableField(value = "promotion_time")
|
||||
@ApiModelProperty(value = "宣贯时间(年月)")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM")
|
||||
@DateTimeFormat(pattern="yyyy-MM")
|
||||
private Date promotionTime;
|
||||
|
||||
/**
|
||||
* 宣贯地点
|
||||
*/
|
||||
@TableField(value = "`promotion_location`")
|
||||
@ApiModelProperty(value = "宣贯地点")
|
||||
private String promotionLocation;
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.meeting.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.meeting.entity.PayMeetingStandardProject;
|
||||
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-03-13 11:16
|
||||
*/
|
||||
public interface PayMeetingStandardProjectMapper extends BaseMapper<PayMeetingStandardProject> {
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
<?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.jero.meeting.mapper.PayMeetingStandardProjectMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jero.meeting.entity.PayMeetingStandardProject">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table pay_meeting_standard_project-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="meeting_id" jdbcType="VARCHAR" property="meetingId" />
|
||||
<result column="standard_no" jdbcType="VARCHAR" property="standardNo" />
|
||||
<result column="standard_name" jdbcType="VARCHAR" property="standardName" />
|
||||
<result column="standard_type" jdbcType="BOOLEAN" property="standardType" />
|
||||
<result column="preparation_and_revision" jdbcType="BOOLEAN" property="preparationAndRevision" />
|
||||
<result column="promoter" jdbcType="VARCHAR" property="promoter" />
|
||||
<result column="promotion_time" jdbcType="TIMESTAMP" property="promotionTime" />
|
||||
<result column="promotion _location" jdbcType="VARCHAR" property="promotionLocation" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, meeting_id, standard_no, standard_name, standard_type, preparation_and_revision,
|
||||
promoter, promotion_time, `promotion _location`
|
||||
</sql>
|
||||
</mapper>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.meeting.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.meeting.mapper.PayMeetingStandardProjectMapper;
|
||||
import com.jero.meeting.entity.PayMeetingStandardProject;
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-03-13 11:16
|
||||
*/
|
||||
@Service
|
||||
public class PayMeetingStandardProjectService extends ServiceImpl<PayMeetingStandardProjectMapper, PayMeetingStandardProject> {
|
||||
|
||||
}
|
||||
+37
-7
@@ -147,7 +147,8 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
private IPayCompanyManagementService companyManagementService;
|
||||
@Resource
|
||||
private IPayContactsManagementService contactsManagementService;
|
||||
|
||||
@Resource
|
||||
private PayMeetingStandardProjectService meetingStandardProjectService;
|
||||
/**
|
||||
* 新增会议
|
||||
*/
|
||||
@@ -158,13 +159,13 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
//进行校验,赋值操作
|
||||
PayMeeting payMeeting = getPayMeeting(payMeetingVO, hotelContactsList);
|
||||
save(payMeeting);
|
||||
String meetingId = payMeeting.getId();
|
||||
if(!org.springframework.util.CollectionUtils.isEmpty(payMeetingVO.getQuestionList())) {
|
||||
List<PayMeetingStandard> collect = payMeetingVO.getQuestionList().stream().map(s -> s.setMeetingId(payMeeting.getId())).collect(Collectors.toList());
|
||||
List<PayMeetingStandard> collect = payMeetingVO.getQuestionList().stream().map(s -> s.setMeetingId(meetingId)).collect(Collectors.toList());
|
||||
payMeetingStandardService.saveBatch(collect);
|
||||
}
|
||||
//如果酒店联系人列表不为空,就新增
|
||||
if (!CollectionUtils.isEmpty(hotelContactsList)) {
|
||||
String meetingId = payMeeting.getId();
|
||||
hotelContactsList.forEach(hotelContacts ->
|
||||
hotelContacts.setMeetingId(meetingId)
|
||||
);
|
||||
@@ -173,7 +174,10 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
Integer meetingType = payMeeting.getMeetingType();
|
||||
//会议联系人
|
||||
List<PayMeetingContacts> meetingContactsList = payMeetingVO.getMeetingContactsList();
|
||||
addMeetingContactsList(meetingContactsList, payMeeting.getId(),meetingType.equals(MeetingCommon.STANDARD_MEETING_INT));
|
||||
addMeetingContactsList(meetingContactsList, meetingId,meetingType.equals(MeetingCommon.STANDARD_MEETING_INT));
|
||||
//标准项目
|
||||
List<PayMeetingStandardProject> payMeetingStandardProjectList = payMeetingVO.getStandardProjectList();
|
||||
addMeetingStandardProjectList(payMeetingStandardProjectList,meetingId);
|
||||
//新增会员系统标协会议
|
||||
if (meetingType.equals(MeetingCommon.STANDARD_MEETING_INT)) {
|
||||
String directorId = payMeeting.getDirectorId();
|
||||
@@ -198,6 +202,7 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
fileIdList.addAll(arrayList);
|
||||
}
|
||||
pushStandardsFiles(fileIdList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,16 +329,16 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
//进行校验,赋值操作
|
||||
PayMeeting payMeeting = getPayMeeting(payMeetingVO, hotelContactsList);
|
||||
saveOrUpdate(payMeeting);
|
||||
String meetingId = payMeeting.getId();
|
||||
// 同步预计到账日期
|
||||
LambdaUpdateWrapper<PayMeetingSituation> upPayMeetingSituation = new LambdaUpdateWrapper<>();
|
||||
upPayMeetingSituation.eq(PayMeetingSituation::getMeetingId,payMeeting.getId());
|
||||
upPayMeetingSituation.eq(PayMeetingSituation::getMeetingId, meetingId);
|
||||
upPayMeetingSituation.set(PayMeetingSituation::getEstimatedArrivalDate,payMeeting.getStartTime());
|
||||
payMeetingSituationService.update(upPayMeetingSituation);
|
||||
|
||||
delWithStandardForUpdate(payMeeting);
|
||||
//如果酒店联系人列表不为空,就更新
|
||||
if (!CollectionUtils.isEmpty(hotelContactsList)) {
|
||||
String meetingId = payMeeting.getId();
|
||||
//先删除原先的酒店联系人,在添加新的
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayMeetingHotelContacts::getMeetingId, meetingId);
|
||||
@@ -346,7 +351,10 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
Integer meetingType = payMeeting.getMeetingType();
|
||||
//会议联系人
|
||||
List<PayMeetingContacts> meetingContactsList = payMeetingVO.getMeetingContactsList();
|
||||
addMeetingContactsList(meetingContactsList, payMeeting.getId(), meetingType.equals(MeetingCommon.STANDARD_MEETING_INT));
|
||||
addMeetingContactsList(meetingContactsList, meetingId, meetingType.equals(MeetingCommon.STANDARD_MEETING_INT));
|
||||
//标准项目
|
||||
List<PayMeetingStandardProject> payMeetingStandardProjectList = payMeetingVO.getStandardProjectList();
|
||||
addMeetingStandardProjectList(payMeetingStandardProjectList,meetingId);
|
||||
//编辑标协会议
|
||||
if (meetingType.equals(Integer.parseInt(MeetingCommon.STANDARD_MEETING))) {
|
||||
String directorId = payMeeting.getDirectorId();
|
||||
@@ -412,6 +420,20 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void addMeetingStandardProjectList(List<PayMeetingStandardProject> standardProjectList, String meetingId) {
|
||||
if (!CollectionUtils.isEmpty(standardProjectList)) {
|
||||
//先删除原先的标准项目,在添加新的
|
||||
LambdaQueryWrapper<PayMeetingStandardProject> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayMeetingStandardProject::getMeetingId, meetingId);
|
||||
meetingStandardProjectService.remove(queryWrapper);
|
||||
standardProjectList.forEach(meetingContacts ->
|
||||
meetingContacts.setMeetingId(meetingId)
|
||||
);
|
||||
meetingStandardProjectService.saveBatch(standardProjectList);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private PayMeeting getPayMeeting(PayMeetingVO payMeetingVO, List<PayMeetingHotelContacts> hotelContactsList) {
|
||||
PayMeeting payMeeting = new PayMeeting();
|
||||
@@ -637,6 +659,10 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, id);
|
||||
meetingHotelContactsService.remove(wrapper);
|
||||
|
||||
LambdaQueryWrapper<PayMeetingStandardProject> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayMeetingStandardProject::getMeetingId, id);
|
||||
meetingStandardProjectService.remove(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -659,6 +685,10 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(PayMeetingHotelContacts::getMeetingId, ids);
|
||||
meetingHotelContactsService.remove(wrapper);
|
||||
|
||||
LambdaQueryWrapper<PayMeetingStandardProject> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(PayMeetingStandardProject::getMeetingId, ids);
|
||||
meetingStandardProjectService.remove(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import com.jero.common.util.PasswordUtil;
|
||||
import com.jero.meeting.entity.PayMeetingContacts;
|
||||
import com.jero.meeting.entity.PayMeetingHotelContacts;
|
||||
import com.jero.meeting.entity.PayMeetingStandard;
|
||||
import com.jero.meeting.entity.Question;
|
||||
import com.jero.meeting.entity.*;
|
||||
import com.jero.meeting.valid.group.*;
|
||||
import com.jero.modules.system.volid.group.UpdateGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@@ -367,4 +364,10 @@ public class PayMeetingVO implements Serializable {
|
||||
/**起草组名称*/
|
||||
@ApiModelProperty(value = "起草组名称")
|
||||
private String draftingGroupName;
|
||||
|
||||
/**
|
||||
* 标准项目列表
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<PayMeetingStandardProject> standardProjectList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user