diff --git a/adc-da-activiti/src/main/java/com/adc/da/workFlow/controller/ActSarItemMeetingEOController.java b/adc-da-activiti/src/main/java/com/adc/da/workFlow/controller/ActSarItemMeetingEOController.java new file mode 100644 index 00000000..e0cfee9d --- /dev/null +++ b/adc-da-activiti/src/main/java/com/adc/da/workFlow/controller/ActSarItemMeetingEOController.java @@ -0,0 +1,39 @@ +package com.adc.da.workFlow.controller; + +import com.adc.da.http.ResponseMessage; +import com.adc.da.http.Result; +import com.adc.da.workFlow.service.ActSarItemMeetingEOService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +/** + * @author tjzdw + * @description + * @date 2023/10/16 + */ + +@RestController +@RequestMapping("/${restPath}/lawss/meeting") +@Api(description = "|InsideOutsideMeeting|") +public class ActSarItemMeetingEOController { + + @Resource + private ActSarItemMeetingEOService meetingEOService; + + + @ApiOperation(value = "|SarLawsStandInfo|内外部会议入库") + @PostMapping("/processCreateMeeting") + public ResponseMessage processCreateMeeting(String infoJson) throws Exception { + if (StringUtils.isBlank(infoJson)) { + return Result.error("传入数据json不能为空"); + } + meetingEOService.processCreateMeeting(infoJson); + return Result.success("入库成功"); + } +} diff --git a/adc-da-activiti/src/main/java/com/adc/da/workFlow/service/ActSarItemMeetingEOService.java b/adc-da-activiti/src/main/java/com/adc/da/workFlow/service/ActSarItemMeetingEOService.java new file mode 100644 index 00000000..b525df00 --- /dev/null +++ b/adc-da-activiti/src/main/java/com/adc/da/workFlow/service/ActSarItemMeetingEOService.java @@ -0,0 +1,42 @@ +package com.adc.da.workFlow.service; + +import com.adc.da.exception.AdcDaBaseException; +import com.adc.da.slrs.InsideOntSideMeeting.entity.InsideOutsideMeeting; +import com.adc.da.slrs.InsideOntSideMeeting.service.InsideOutsideMeetingService; +import com.alibaba.fastjson.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.*; + +/** + * @author tjzdw + * @description + * @date 2023/10/16 + */ +@Service +@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) +public class ActSarItemMeetingEOService { + + @Resource + private InsideOutsideMeetingService meetingService; + + private static final Logger logger = LoggerFactory.getLogger(ActSarItemMeetingEOService.class); + + public void processCreateMeeting(String meetingInfo) throws Exception{ + Map standMap = new HashMap<>(); + standMap = JSONObject.parseObject(meetingInfo); + if (standMap == null || standMap.isEmpty()) { + throw new AdcDaBaseException("入库失败,会议信息出错"); + } + String prcNum = String.valueOf(standMap.get("prcNum")); + String meetingName = String.valueOf(standMap.get("meetingName")); + InsideOutsideMeeting insideOutsideMeeting = JSONObject.parseObject(meetingInfo, InsideOutsideMeeting.class); + System.out.println(insideOutsideMeeting); + meetingService.addMeetingInfo(insideOutsideMeeting); + } +} diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/controller/SarLawsTopicController.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/controller/SarLawsTopicController.java new file mode 100644 index 00000000..8e69b57a --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/controller/SarLawsTopicController.java @@ -0,0 +1,75 @@ +package com.adc.da.slrs.sarLawsTopic.controller; + +import com.adc.da.base.web.BaseController; +import com.adc.da.http.PageInfo; +import com.adc.da.http.ResponseMessage; +import com.adc.da.http.Result; +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopic; +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicVO; +import com.adc.da.slrs.sarLawsTopic.service.SarLawsTopicService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author tjzdw + * @description + * @date 2023/10/17 + */ +@Api("政策课题模块") +@RestController +@RequestMapping("/${restPath}/lawss/sarLawsTopic") +public class SarLawsTopicController extends BaseController { + + @Resource + private SarLawsTopicService lawsTopicService; + + @ApiOperation(value = "根据政策课题ID查询会议信息") + @GetMapping("/getLawsTopicInfo") + public ResponseMessage getLawsTopicInfo(String lawsTopicId){ + if (StringUtils.isBlank(lawsTopicId)) { + return Result.error("会议ID为空!"); + } + SarLawsTopic sarLawsTopic = lawsTopicService.getLawsTopicInfo(lawsTopicId); + return Result.success(sarLawsTopic); + } + + @ApiOperation(value = "分页查询") + @GetMapping("/page") + public ResponseMessage> page(SarLawsTopicVO sarLawsTopicVO) { + List rows = lawsTopicService.queryByPage(sarLawsTopicVO); + return Result.success(getPageInfo(sarLawsTopicVO.getPager(), rows)); + } + + @ApiOperation(value = "新增政策课题") + @PostMapping(value = "/addLawsTopic", consumes = "application/json;charset=UTF-8") + public ResponseMessage create(@RequestBody SarLawsTopic lawsTopic) throws Exception { + lawsTopicService.addLawsTopicInfo(lawsTopic); + return Result.success(); + } + + @ApiOperation("根据会议ID删除会议") + @DeleteMapping("/deleteLawsTopicById") + public ResponseMessage deleteMeeting(String lawsTopicId) { + if (StringUtils.isBlank(lawsTopicId)) { + return Result.error("删除失败,政策课题ID为空"); + } + lawsTopicService.deleteLawsTopicInfo(lawsTopicId); + return Result.success(); + } + + @ApiOperation("根据会议ID修改会议信息") + @PutMapping("/updateLawsTopicInfo") + public ResponseMessage updateMeetingInfo(@RequestBody SarLawsTopic lawsTopic) { + if (ObjectUtils.isEmpty(lawsTopic)) { + return Result.error("更新失败,政策课题信息不存在"); + } + Boolean updateResult = lawsTopicService.updateLawsTopicInfo(lawsTopic); + return updateResult ? Result.success() : Result.error("更新失败"); + } +} diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/dao/SarLawsContactInformationMapper.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/dao/SarLawsContactInformationMapper.java new file mode 100644 index 00000000..83527477 --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/dao/SarLawsContactInformationMapper.java @@ -0,0 +1,20 @@ +package com.adc.da.slrs.sarLawsTopic.dao; + +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsContactInformation; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** +* @author tjzdw +* @description 针对表【sar_laws_contact_information(政策课题组联系方式)】的数据库操作Mapper +* @createDate 2023-10-17 15:41:32 +* @Entity com.adc.da.slrs.sarLawsTopic.entity.SarLawsContactInformation +*/ +@Mapper +public interface SarLawsContactInformationMapper extends BaseMapper { + +} + + + + diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/dao/SarLawsTopicMapper.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/dao/SarLawsTopicMapper.java new file mode 100644 index 00000000..506dd9ff --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/dao/SarLawsTopicMapper.java @@ -0,0 +1,26 @@ +package com.adc.da.slrs.sarLawsTopic.dao; + +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopic; +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** +* @author tjzdw +* @description 针对表【sar_laws_topic(政策课题)】的数据库操作Mapper +* @createDate 2023-10-17 15:17:33 +* @Entity com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopic +*/ +@Mapper +public interface SarLawsTopicMapper extends BaseMapper { + + Integer queryByPageCount(SarLawsTopicVO page); + + List queryByPage(SarLawsTopicVO page); +} + + + + diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/dao/SarLawsTopicMeetingMapper.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/dao/SarLawsTopicMeetingMapper.java new file mode 100644 index 00000000..c91c3f54 --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/dao/SarLawsTopicMeetingMapper.java @@ -0,0 +1,20 @@ +package com.adc.da.slrs.sarLawsTopic.dao; + +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicMeeting; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** +* @author tjzdw +* @description 针对表【sar_laws_topic_meeting(政策课题组会议)】的数据库操作Mapper +* @createDate 2023-10-17 15:20:27 +* @Entity com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicMeeting +*/ +@Mapper +public interface SarLawsTopicMeetingMapper extends BaseMapper { + +} + + + + diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsContactInformation.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsContactInformation.java new file mode 100644 index 00000000..6b0d4584 --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsContactInformation.java @@ -0,0 +1,67 @@ +package com.adc.da.slrs.sarLawsTopic.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 java.io.Serializable; +import lombok.Data; + +/** + * 政策课题组联系方式 + * @TableName sar_laws_contact_information + */ +@TableName(value ="sar_laws_contact_information") +@Data +public class SarLawsContactInformation implements Serializable { + /** + * 主键 + */ + @TableId(value = "ID", type = IdType.ID_WORKER_STR) + private String id; + + /** + * 政策课题ID + */ + @TableField(value = "LAWS_TOPIC_ID") + private String lawsTopicId; + + /** + * 所属组别 + */ + @TableField(value = "GROUP_TYPE") + private String groupType; + + /** + * 姓名 + */ + @TableField(value = "NAME") + private String name; + + /** + * 单位 + */ + @TableField(value = "DEPARTMENT") + private String department; + + /** + * 电话 + */ + @TableField(value = "PHONE") + private String phone; + + /** + * 邮箱 + */ + @TableField(value = "EMAIL") + private String email; + + /** + * 身份 + */ + @TableField(value = "IDENTITY") + private String identity; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsTopic.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsTopic.java new file mode 100644 index 00000000..56652901 --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsTopic.java @@ -0,0 +1,177 @@ +package com.adc.da.slrs.sarLawsTopic.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 java.io.Serializable; +import java.util.Date; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +/** + * 政策课题 + * @TableName sar_laws_topic + */ +@TableName(value ="sar_laws_topic") +@Data +public class SarLawsTopic implements Serializable { + /** + * 主键 + */ + @TableId(value = "ID", type = IdType.ID_WORKER_STR) + private String id; + + /** + * 课题名称 + */ + @TableField(value = "TOPIC_NAME") + private String topicName; + + /** + * 课题承办单位 + */ + @TableField(value = "ORGANIZER") + private String organizer; + + /** + * 课题指导单位 + */ + @TableField(value = "GUIDANCE_UNIT") + private String guidanceUnit; + + /** + * 课题参与单位 + */ + @TableField(value = "PARTICIPATING_UNIT") + private String participatingUnit; + + /** + * 开始时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(value = "START_TIME") + private Date startTime; + + /** + * 结题时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(value = "CLOSE_TIME") + private Date closeTime; + + /** + * 课题状态 + */ + @TableField(value = "TOPIC_STATUS") + private String topicStatus; + + /** + * 课题费用(万元) + */ + @TableField(value = "TOPIC_COST") + private String topicCost; + + /** + * 协议 + */ + @TableField(value = "AGREEMENT") + private String agreement; + + /** + * 课题组会议列表 + */ + @TableField(exist = false) + private List meetingList; + + /** + * 课题组研究方案 + */ + @TableField(value = "RESEARCH_PLAN") + private String researchPlan; + + /** + * 课题组研究成果 + */ + @TableField(value = "RESEARCH_FINDINGS") + private String researchFindings; + + /** + * 课题组其他 + */ + @TableField(value = "RESEARCH_GROUP_OTHER") + private String researchGroupOther; + + /** + * 课题组会议资料 + */ + @TableField(value = "CONFERENCE_MATERIALS") + private String conferenceMaterials; + + /** + * 课题组联系方式 + */ + @TableField(exist = false) + private List topicContactInformationList; + + /** + * 内部资料立项报告 + */ + @TableField(value = "INSIDE_PROJECT_PROPOSAL_REPORT") + private String insideProjectProposalRepost; + + /** + * 内部资料研究方案 + */ + @TableField(value = "INSIDE_RESEARCH_PLAN") + private String insideResearchPlan; + + /** + * 内部资料会议资料 + */ + @TableField(value = "INSIDE_CONFERENCE_MATERIALS") + private String insideConferenceMaterials; + + /** + * 内部会议研究成果 + */ + @TableField(value = "INSIDE_RESEARCH_FINDINGS") + private String insideResearchFindings; + + /** + * 内部会议其他 + */ + @TableField(value = "INSIDE_OTHER") + private String insideOther; + + /** + * 内部联系方式 + */ + @TableField(exist = false) + private List insideContactInformationList; + + /** + * 逻辑删除,0可用,1不可用 + */ + @TableField(value = "VALID_FLAG") + private Integer validFlag; + + /** + * 创建时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(value = "CREATE_TIME") + private Date createTime; + + /** + * 修改时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(value = "MODIFY_TIME") + private Date modifyTime; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsTopicMeeting.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsTopicMeeting.java new file mode 100644 index 00000000..b6f86cef --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsTopicMeeting.java @@ -0,0 +1,65 @@ +package com.adc.da.slrs.sarLawsTopic.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 java.io.Serializable; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +/** + * 政策课题组会议 + * @TableName sar_laws_topic_meeting + */ +@TableName(value ="sar_laws_topic_meeting") +@Data +public class SarLawsTopicMeeting implements Serializable { + /** + * 主键 + */ + @TableId(value = "ID", type = IdType.ID_WORKER_STR) + private String id; + + /** + * 政策课题ID + */ + @TableField(value = "LAWS_TOPIC_ID") + private String lawsTopicId; + + /** + * 会议名称 + */ + @TableField(value = "MEETING_NAME") + private String meetingName; + + /** + * 会议时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(value = "MEETING_TIME") + private Date meetingTime; + + /** + * 会议地点 + */ + @TableField(value = "MEETING_ADDRESS") + private String meetingAddress; + + /** + * 参会人员(内部) + */ + @TableField(value = "PARTICIPANTS") + private String participants; + + /** + * 会议主要内容 + */ + @TableField(value = "MEETING_CONTENT") + private String meetingContent; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsTopicVO.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsTopicVO.java new file mode 100644 index 00000000..f9958fa6 --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/entity/SarLawsTopicVO.java @@ -0,0 +1,207 @@ +package com.adc.da.slrs.sarLawsTopic.entity; + +import com.adc.da.base.page.BasePage; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.util.Date; +import java.util.List; + +/** + * @author tjzdw + * @description + * @date 2023/10/17 + */ +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +@Data +public class SarLawsTopicVO extends BasePage { + /** + * 主键 + */ + private String id; + + /** + * 课题名称 + */ + private String topicName; + + /** + * 课题承办单位 + */ + private String organizer; + + /** + * 课题指导单位 + */ + private String guidanceUnit; + + /** + * 课题参与单位 + */ + private String participatingUnit; + + /** + * 开始时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + + /** + * 结题时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + private Date closeTime; + + /** + * 课题状态 + */ + private String topicStatus; + + /** + * 课题费用(万元) + */ + private String topicCost; + + /** + * 协议 + */ + private String agreement; + + /** + * 课题组会议列表 + */ + private List meetingList; + + /** + * 会议名称 + */ + private String meetingName; + + /** + * 会议时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + private Date meetingTime; + + /** + * 会议地点 + */ + private String meetingAddress; + + /** + * 参会人员(内部) + */ + private String participants; + + // 参会人员列表 + private List participantsList; + + /** + * 会议主要内容 + */ + private String meetingContent; + + /** + * 课题组研究方案 + */ + private String researchPlan; + + /** + * 课题组研究成果 + */ + private String researchFindings; + + /** + * 课题组其他 + */ + private String researchGroupOther; + + /** + * 课题组会议资料 + */ + private String conferenceMaterials; + + /** + * 课题组联系方式 + */ + private List topicContactInformationList; + + // 课题组用户名称 + private String topicGroupName; + // 课题组部门 + private String topicGroupDepartment; + // 课题组电话 + private String topicGroupPhone; + // 课题组用户邮箱 + private String topicGroupEmail; + // 课题组用户身份 + private String topicGroupIdentity; + + /** + * 内部资料立项报告 + */ + private String insideProjectProposalRepost; + + /** + * 内部资料研究方案 + */ + private String insideResearchPlan; + + /** + * 内部资料会议资料 + */ + private String insideConferenceMaterials; + + /** + * 内部会议研究成果 + */ + private String insideResearchFindings; + + /** + * 内部会议其他 + */ + private String insideOther; + + /** + * 内部联系方式 + */ + private List insideContactInformationList; + + // 内部人员名称 + private String insideName; + // 内部人员部门 + private String insideDepartment; + // 内部人员电话 + private String insidePhone; + // 内部人员邮箱 + private String insideEmail; + // 内部人员身份 + private String insideIdentity; + + /** + * 逻辑删除,0可用,1不可用 + */ + private Integer validFlag; + + /** + * 创建时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** + * 修改时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + private Date modifyTime; + + private String sortField = "ID"; + + private String sortMode = "asc"; + + private String startTimeOperator = "="; + private String closeTimeOperator = "="; +} diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/SarLawsContactInformationService.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/SarLawsContactInformationService.java new file mode 100644 index 00000000..95580fe5 --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/SarLawsContactInformationService.java @@ -0,0 +1,13 @@ +package com.adc.da.slrs.sarLawsTopic.service; + +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsContactInformation; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author tjzdw +* @description 针对表【sar_laws_contact_information(政策课题组联系方式)】的数据库操作Service +* @createDate 2023-10-17 15:41:32 +*/ +public interface SarLawsContactInformationService extends IService { + +} diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/SarLawsTopicMeetingService.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/SarLawsTopicMeetingService.java new file mode 100644 index 00000000..0b79192f --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/SarLawsTopicMeetingService.java @@ -0,0 +1,13 @@ +package com.adc.da.slrs.sarLawsTopic.service; + +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicMeeting; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author tjzdw +* @description 针对表【sar_laws_topic_meeting(政策课题组会议)】的数据库操作Service +* @createDate 2023-10-17 15:20:27 +*/ +public interface SarLawsTopicMeetingService extends IService { + +} diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/SarLawsTopicService.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/SarLawsTopicService.java new file mode 100644 index 00000000..2d59726e --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/SarLawsTopicService.java @@ -0,0 +1,25 @@ +package com.adc.da.slrs.sarLawsTopic.service; + +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopic; +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicVO; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** +* @author tjzdw +* @description 针对表【sar_laws_topic(政策课题)】的数据库操作Service +* @createDate 2023-10-17 15:17:33 +*/ +public interface SarLawsTopicService extends IService { + + SarLawsTopic getLawsTopicInfo(String lawsTopicId); + + Integer addLawsTopicInfo(SarLawsTopic lawsTopic); + + Boolean deleteLawsTopicInfo(String lawsTopicId); + + Boolean updateLawsTopicInfo(SarLawsTopic lawsTopic); + + List queryByPage(SarLawsTopicVO sarLawsTopicVO); +} diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/impl/SarLawsContactInformationServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/impl/SarLawsContactInformationServiceImpl.java new file mode 100644 index 00000000..40ec89f8 --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/impl/SarLawsContactInformationServiceImpl.java @@ -0,0 +1,22 @@ +package com.adc.da.slrs.sarLawsTopic.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsContactInformation; +import com.adc.da.slrs.sarLawsTopic.service.SarLawsContactInformationService; +import com.adc.da.slrs.sarLawsTopic.dao.SarLawsContactInformationMapper; +import org.springframework.stereotype.Service; + +/** +* @author tjzdw +* @description 针对表【sar_laws_contact_information(政策课题组联系方式)】的数据库操作Service实现 +* @createDate 2023-10-17 15:41:32 +*/ +@Service +public class SarLawsContactInformationServiceImpl extends ServiceImpl + implements SarLawsContactInformationService{ + +} + + + + diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/impl/SarLawsTopicMeetingServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/impl/SarLawsTopicMeetingServiceImpl.java new file mode 100644 index 00000000..c694e6ba --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/impl/SarLawsTopicMeetingServiceImpl.java @@ -0,0 +1,22 @@ +package com.adc.da.slrs.sarLawsTopic.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicMeeting; +import com.adc.da.slrs.sarLawsTopic.service.SarLawsTopicMeetingService; +import com.adc.da.slrs.sarLawsTopic.dao.SarLawsTopicMeetingMapper; +import org.springframework.stereotype.Service; + +/** +* @author tjzdw +* @description 针对表【sar_laws_topic_meeting(政策课题组会议)】的数据库操作Service实现 +* @createDate 2023-10-17 15:20:27 +*/ +@Service +public class SarLawsTopicMeetingServiceImpl extends ServiceImpl + implements SarLawsTopicMeetingService{ + +} + + + + diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/impl/SarLawsTopicServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/impl/SarLawsTopicServiceImpl.java new file mode 100644 index 00000000..f989c69a --- /dev/null +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsTopic/service/impl/SarLawsTopicServiceImpl.java @@ -0,0 +1,172 @@ +package com.adc.da.slrs.sarLawsTopic.service.impl; + +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsContactInformation; +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicMeeting; +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicVO; +import com.adc.da.slrs.sarLawsTopic.service.SarLawsContactInformationService; +import com.adc.da.slrs.sarLawsTopic.service.SarLawsTopicMeetingService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopic; +import com.adc.da.slrs.sarLawsTopic.service.SarLawsTopicService; +import com.adc.da.slrs.sarLawsTopic.dao.SarLawsTopicMapper; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +/** +* @author tjzdw +* @description 针对表【sar_laws_topic(政策课题)】的数据库操作Service实现 +* @createDate 2023-10-17 15:17:33 +*/ +@Service +public class SarLawsTopicServiceImpl extends ServiceImpl + implements SarLawsTopicService{ + + @Resource + private SarLawsTopicMeetingService meetingService; + + @Resource + private SarLawsContactInformationService contactInformationService; + + @Override + public SarLawsTopic getLawsTopicInfo(String lawsTopicId) { + SarLawsTopic sarLawsTopic = this.baseMapper.selectById(lawsTopicId); + if (sarLawsTopic != null) { + // 查询课题组会议 + LambdaQueryWrapper meetingWrapper = new LambdaQueryWrapper<>(); + meetingWrapper.eq(SarLawsTopicMeeting::getLawsTopicId, lawsTopicId); + List topicMeetingList = meetingService.list(meetingWrapper); + sarLawsTopic.setMeetingList(topicMeetingList); + // 查询课题组联系方式 + LambdaQueryWrapper topicGroupWrapper = new LambdaQueryWrapper<>(); + topicGroupWrapper.eq(SarLawsContactInformation::getLawsTopicId, lawsTopicId); + topicGroupWrapper.eq(SarLawsContactInformation::getGroupType,"lawsTopic"); + List lawsTopicContactInformation = contactInformationService.list(topicGroupWrapper); + sarLawsTopic.setTopicContactInformationList(lawsTopicContactInformation); + // 查询内部联系房方式 + LambdaQueryWrapper insideWrapper = new LambdaQueryWrapper<>(); + topicGroupWrapper.eq(SarLawsContactInformation::getLawsTopicId, lawsTopicId); + topicGroupWrapper.eq(SarLawsContactInformation::getGroupType,"lawsTopic"); + List insideContactInformation = contactInformationService.list(topicGroupWrapper); + sarLawsTopic.setInsideContactInformationList(insideContactInformation); + } + return sarLawsTopic; + } + + @Transactional + @Override + public Integer addLawsTopicInfo(SarLawsTopic lawsTopic) { + lawsTopic.setCreateTime(new Date()); + lawsTopic.setModifyTime(new Date()); + lawsTopic.setValidFlag(0); + int insert = this.baseMapper.insert(lawsTopic); + if (lawsTopic.getMeetingList() != null && !lawsTopic.getMeetingList().isEmpty()) { + for (SarLawsTopicMeeting meeting : lawsTopic.getMeetingList()) { + meeting.setLawsTopicId(lawsTopic.getId()); + meetingService.save(meeting); + } + } + if (lawsTopic.getTopicContactInformationList() != null && !lawsTopic.getTopicContactInformationList().isEmpty()) { + for (SarLawsContactInformation information : lawsTopic.getTopicContactInformationList()) { + information.setLawsTopicId(lawsTopic.getId()); + information.setGroupType("topicGroup"); + contactInformationService.save(information); + } + } + if (lawsTopic.getInsideContactInformationList() != null && !lawsTopic.getInsideContactInformationList().isEmpty()) { + for (SarLawsContactInformation information : lawsTopic.getInsideContactInformationList()) { + information.setLawsTopicId(lawsTopic.getId()); + information.setGroupType("inside"); + contactInformationService.save(information); + } + } + return insert; + } + + @Transactional + @Override + public Boolean deleteLawsTopicInfo(String lawsTopicId) { + LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper<>(); + wrapper.eq(SarLawsTopic::getId, lawsTopicId); + wrapper.set(SarLawsTopic::getValidFlag,1); + wrapper.set(SarLawsTopic::getModifyTime,new Date()); + boolean update = update(wrapper); + if (update) { + LambdaQueryWrapper lawsTopicWrapper = new LambdaQueryWrapper<>(); + lawsTopicWrapper.eq(SarLawsTopicMeeting::getLawsTopicId, lawsTopicId); + meetingService.remove(lawsTopicWrapper); + LambdaQueryWrapper informationWrapper = new LambdaQueryWrapper<>(); + informationWrapper.eq(SarLawsContactInformation::getLawsTopicId, lawsTopicId); + contactInformationService.remove(informationWrapper); + } + return update; + } + + @Transactional + @Override + public Boolean updateLawsTopicInfo(SarLawsTopic lawsTopic) { + if (StringUtils.isBlank(lawsTopic.getId())) { + return false; + } + lawsTopic.setModifyTime(new Date()); + int update = this.baseMapper.updateById(lawsTopic); + if (update <= 0) { + return true; + } + System.out.println(lawsTopic.getTopicContactInformationList()); + System.out.println(lawsTopic.getInsideContactInformationList()); + // 先删除关联信息 + LambdaQueryWrapper topicWrapper = new LambdaQueryWrapper<>(); + topicWrapper.eq(SarLawsTopicMeeting::getLawsTopicId,lawsTopic.getId()); + meetingService.remove(topicWrapper); + LambdaQueryWrapper informationWrapper = new LambdaQueryWrapper<>(); + informationWrapper.eq(SarLawsContactInformation::getLawsTopicId,lawsTopic.getId()); + contactInformationService.remove(informationWrapper); + // 再添加关联信息 + for (SarLawsTopicMeeting meeting : lawsTopic.getMeetingList()) { + meeting.setLawsTopicId(lawsTopic.getId()); + meetingService.save(meeting); + } + for (SarLawsContactInformation information : lawsTopic.getTopicContactInformationList()) { + information.setGroupType("topicGroup"); + information.setLawsTopicId(lawsTopic.getId()); + contactInformationService.save(information); + } + for (SarLawsContactInformation information : lawsTopic.getInsideContactInformationList()) { + information.setGroupType("inside"); + information.setLawsTopicId(lawsTopic.getId()); + contactInformationService.save(information); + } + return true; + } + + + @Override + public List queryByPage(SarLawsTopicVO page){ + if (StringUtils.isNotBlank(page.getParticipants())) { + page.setParticipantsList(Arrays.asList(page.getParticipants().split(","))); + } + // 设置排序字段 + if (StringUtils.isNotBlank(page.getSortField())) { + String sortField = StringUtils.join(StringUtils.splitByCharacterTypeCamelCase(page.getSortField()),"_").toUpperCase(); + page.setSortField(sortField); + } else { + page.setSortField("ID"); + page.setSortMode("asc"); + } + Integer rowCount = this.baseMapper.queryByPageCount(page); + page.getPager().setRowCount(rowCount); + return this.baseMapper.queryByPage(page); + } +} + + + + diff --git a/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsTopic/SarLawsContactInformationMapper.xml b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsTopic/SarLawsContactInformationMapper.xml new file mode 100644 index 00000000..0640d7ca --- /dev/null +++ b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsTopic/SarLawsContactInformationMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + ID,LAWS_TOPIC_ID,GROUP_TYPE, + `NAME`,DEPARTMENT,PHONE, + EMAIL,IDENTITY + + diff --git a/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsTopic/SarLawsTopicMapper.xml b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsTopic/SarLawsTopicMapper.xml new file mode 100644 index 00000000..68611183 --- /dev/null +++ b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsTopic/SarLawsTopicMapper.xml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ID,TOPIC_NAME,ORGANIZER, + GUIDANCE_UNIT,PARTICIPATING_UNIT,START_TIME, + CLOSE_TIME,TOPIC_STATUS,TOPIC_COST,AGREEMENT, + RESEARCH_PLAN,RESEARCH_FINDINGS,RESEARCH_GROUP_OTHER, + CONFERENCE_MATERIALS,INSIDE_PROJECT_PROPOSAL_REPORT,INSIDE_RESEARCH_PLAN, + INSIDE_CONFERENCE_MATERIALS,INSIDE_RESEARCH_FINDINGS,INSIDE_OTHER, + VALID_FLAG,CREATE_TIME,MODIFY_TIME + + + slt.ID,slt.TOPIC_NAME,slt.ORGANIZER, + slt.GUIDANCE_UNIT,slt.PARTICIPATING_UNIT,slt.START_TIME, + slt.CLOSE_TIME,slt.TOPIC_STATUS,slt.TOPIC_COST,slt.AGREEMENT, + sltm.ID, + sltm.LAWS_TOPIC_ID, + sltm.MEETING_NAME, + sltm.MEETING_TIME, + sltm.MEETING_ADDRESS, + sltm.PARTICIPANTS, + sltm.MEETING_CONTENT, + slt.RESEARCH_PLAN,slt.RESEARCH_FINDINGS,slt.RESEARCH_GROUP_OTHER, + slt.CONFERENCE_MATERIALS, + slci1.ID as slci1Id, + slci1.LAWS_TOPIC_ID as slci1LawsTopicId, + slci1.GROUP_TYPE slci1GroupType, + slci1.`NAME` as slci1Name, + slci1.DEPARTMENT as slci1Department, + slci1.PHONE as slci1Phone, + slci1.EMAIL as slci1Email, + slci1.IDENTITY as slci1Identity, + slci2.ID as slci2Id, + slci2.LAWS_TOPIC_ID as slci2LawsTopicId, + slci2.GROUP_TYPE as slci2GroupType, + slci2.`NAME` as slci2Name, + slci2.DEPARTMENT as slci2Department, + slci2.PHONE as slci2Phone, + slci2.EMAIL as slci2Email, + slci2.IDENTITY as slci2Identity, + slt.INSIDE_PROJECT_PROPOSAL_REPORT,slt.INSIDE_RESEARCH_PLAN, + slt.INSIDE_CONFERENCE_MATERIALS,slt.INSIDE_RESEARCH_FINDINGS,slt.INSIDE_OTHER, + slt.VALID_FLAG,slt.CREATE_TIME,slt.MODIFY_TIME + + + + + and TOPIC_NAME like concat('%',#{topicName},'%') + + + and ORGANIZER like concat('%',#{organizer},'%') + + + and GUIDANCE_UNIT like concat('%',#{guidanceUnit},'%') + + + and PARTICIPATING_UNIT like concat('%',#{participatingUnit},'%') + + + and START_TIME ${startTimeOperator} #{startTime} + + + and CLOSE_TIME ${startTimeOperator} #{closeTime} + + + and TOPIC_STATUS = #{topicStatus} + + + and TOPIC_COST like concat('%',#{topicCost},'%') + + + + + + and sltm.MEETING_NAME like concat('%',#{meetingName},'%') + + + and sltm.MEETING_TIME like concat('%',#{meetingTime},'%') + + + and sltm.MEETING_ADDRESS like concat('%',#{meetingAddress},'%') + + + + + + + + + and sltm.PARTICIPANTS like concat('%',#{participants},'%') + + + and sltm.MEETING_CONTENT like concat('%',#{meetingContent},'%') + + + + + and slci1.NAME like concat('%',#{topicGroupName},'%') + + + and slci1.DEPARTMENT like concat('%',#{topicGroupDepartment},'%') + + + and slci1.PHONE like concat('%',#{topicGroupPhone},'%') + + + and slci1.EMAIL like concat('%',#{topicGroupEmail},'%') + + + and slci1.IDENTITY like concat('%',#{topicGroupIdentity},'%') + + + and slci2.NAME like concat('%',#{insideName},'%') + + + and slci2.DEPARTMENT like concat('%',#{insideDepartment},'%') + + + and slci2.PHONE like concat('%',#{insidePhone},'%') + + + and slci2.EMAIL like concat('%',#{insideEmail},'%') + + + and slci2.IDENTITY like concat('%',#{insideIdentity},'%') + + + + + + diff --git a/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsTopic/SarLawsTopicMeetingMapper.xml b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsTopic/SarLawsTopicMeetingMapper.xml new file mode 100644 index 00000000..4dd92828 --- /dev/null +++ b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsTopic/SarLawsTopicMeetingMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + ID,LAWS_TOPIC_ID,MEETING_NAME, + MEETING_TIME,MEETING_ADDRESS,PARTICIPANTS, + MEETING_CONTENT + +