工作组 新增方法
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.wgDept.dao;
|
||||
|
||||
import com.adc.da.slrs.wgDept.entity.WgDept;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDeptShow;
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -16,5 +17,5 @@ import java.util.List;
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
public interface WgDeptDao extends BaseMapper<WgDept> {
|
||||
List<WgDept> researchDatas(@Param(value = "data") String data);
|
||||
List<WgDeptShow> researchDatas(@Param(value = "data") String data);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 集团参与情况
|
||||
@@ -49,8 +51,12 @@ public class WgDept extends BaseEntity {
|
||||
private String identity;
|
||||
|
||||
@ApiModelProperty(value = "资料")
|
||||
@TableField("datum")
|
||||
private String datum;
|
||||
@TableField("joinfile")
|
||||
private String joinfile;
|
||||
|
||||
@ApiModelProperty(value = "前端id")
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.adc.da.slrs.wgDept.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 集团参与情况
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgDept对象", description="集团参与情况")
|
||||
public class WgDeptShow extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
@TableId(value = "id",type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "工作组id")
|
||||
@TableField("wg_id")
|
||||
private String wgId;
|
||||
|
||||
@ApiModelProperty(value = "我司在工作组排名顺序")
|
||||
@TableField("dept_order")
|
||||
private String deptOrder;
|
||||
|
||||
@ApiModelProperty(value = "我司人员")
|
||||
@TableField("dept_people_id")
|
||||
private String deptPeopleId;
|
||||
|
||||
@ApiModelProperty(value = "身份")
|
||||
@TableField("identity")
|
||||
private String identity;
|
||||
|
||||
@ApiModelProperty(value = "资料")
|
||||
@TableField("joinfile")
|
||||
private String joinfile;
|
||||
|
||||
@ApiModelProperty(value = "中文名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "部门Id")
|
||||
private String deptId;
|
||||
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
@@ -2,16 +2,21 @@ package com.adc.da.slrs.wgMeetingInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow;
|
||||
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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -40,27 +45,33 @@ public class WgMeetingInfo extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "参会时间")
|
||||
@TableField("meeting_time")
|
||||
private LocalDateTime meetingTime;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date meetingTime;
|
||||
|
||||
@ApiModelProperty(value = "会议名称")
|
||||
@TableField("meet_name")
|
||||
@TableField("meeting_name")
|
||||
private String meetingName;
|
||||
|
||||
@ApiModelProperty(value = "会议人员")
|
||||
@TableField("meeting_people")
|
||||
private String meetingPeople;
|
||||
|
||||
@ApiModelProperty(value = "会议人员名称")
|
||||
@TableField("meeting_people_name")
|
||||
private String meetingPeopleName;
|
||||
|
||||
@ApiModelProperty(value = "会议报告")
|
||||
@TableField("meeting_report")
|
||||
private String meetingReport;
|
||||
|
||||
@ApiModelProperty(value = "会议资料")
|
||||
@TableField("meeting_datum")
|
||||
private String meetingDatum;
|
||||
@TableField("joinfile")
|
||||
private String joinfile;
|
||||
|
||||
@ApiModelProperty(value = "前端id")
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
@ApiModelProperty(value = "人员信息")
|
||||
@TableField(exist = false)
|
||||
private List<String> meetingPeople;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<WgMeetingUserRelationShow> joinMeetingPeopleInfo;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelation;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|WgMeetingUserRelation|")
|
||||
@RequestMapping("/wgMeetingUserRelation")
|
||||
public class WgMeetingUserRelationController extends BaseController<WgMeetingUserRelation> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.dao;
|
||||
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelation;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
public interface WgMeetingUserRelationDao extends BaseMapper<WgMeetingUserRelation> {
|
||||
List<WgMeetingUserRelationShow> getMeetingPeoples(@Param("meetId") String meetingId);
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgMeetingUserRelation对象", description="")
|
||||
public class WgMeetingUserRelation extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "会议id")
|
||||
private String meetingId;
|
||||
|
||||
@ApiModelProperty(value = "人员id")
|
||||
private String userId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.slrs.sarInstitution.entity.TsUserVO;
|
||||
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgMeetingUserRelation对象", description="")
|
||||
public class WgMeetingUserRelationShow extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "会议id")
|
||||
private String meetingId;
|
||||
|
||||
@ApiModelProperty(value = "人员id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "人员名称")
|
||||
private String name;
|
||||
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.service;
|
||||
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelation;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
public interface IWgMeetingUserRelationService extends IService<WgMeetingUserRelation> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.wgMeetingUserRelation.service.impl;
|
||||
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelation;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.dao.WgMeetingUserRelationDao;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.service.IWgMeetingUserRelationService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-09
|
||||
*/
|
||||
@Service
|
||||
public class WgMeetingUserRelationServiceImpl extends ServiceImpl<WgMeetingUserRelationDao, WgMeetingUserRelation> implements IWgMeetingUserRelationService {
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.wgNetInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO;
|
||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -17,6 +18,6 @@ import java.util.List;
|
||||
*/
|
||||
public interface WgNetInfoDao extends BaseMapper<WgNetInfo> {
|
||||
|
||||
List<WgNetInfo> researchDatas(@Param(value = "data") String data);
|
||||
List<WgNetInfoDTO> researchDatas(@Param(value = "data") String data);
|
||||
|
||||
}
|
||||
|
||||
@@ -40,5 +40,9 @@ public class WgNetInfo extends BaseEntity {
|
||||
@TableField("net_id")
|
||||
private String netId;
|
||||
|
||||
@ApiModelProperty(value = "前端id")
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.adc.da.slrs.wgNetInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作组秘书联系方式
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgNetInfo对象", description="工作组秘书联系方式")
|
||||
@TableName("wg_net_info")
|
||||
public class WgNetInfoDTO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
@TableId(value = "id",type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "工作组id")
|
||||
@TableField("wg_id")
|
||||
private String wgId;
|
||||
|
||||
@ApiModelProperty(value = "人员id")
|
||||
@TableField("net_id")
|
||||
private String netId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "前端id")
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
@ApiModelProperty(value = "中文名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
|
||||
}
|
||||
@@ -59,12 +59,15 @@ public class WgPayInfo extends BaseEntity {
|
||||
private String payWay;
|
||||
|
||||
@ApiModelProperty(value = "支付资料")
|
||||
@TableField("pay_datum")
|
||||
private String payDatum;
|
||||
@TableField("joinfile")
|
||||
private String joinfile;
|
||||
|
||||
@ApiModelProperty(value = "费用列支")
|
||||
@TableField("pay_info")
|
||||
private String payInfo;
|
||||
|
||||
@ApiModelProperty(value = "前端id")
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,12 +25,12 @@ import lombok.experimental.Accessors;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="WgWorkGroup对象", description="工作组主表")
|
||||
@TableName("wgWorkGroup")
|
||||
@TableName("wg_work_group")
|
||||
public class WgWorkGroup extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "工作组id")
|
||||
@ApiModelProperty(value = "id")
|
||||
@TableId(value = "id",type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
|
||||
+2
-1
@@ -4,6 +4,7 @@ import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.slrs.wgDept.entity.WgDept;
|
||||
import com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO;
|
||||
import com.adc.da.slrs.wgPayInfo.entity.WgPayInfo;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@@ -74,7 +75,7 @@ public class WgWorkGroupShowDTO extends BaseEntity {
|
||||
List<WgDept> wgDepts;
|
||||
|
||||
//秘书联系方式
|
||||
List<WgNetInfo> wgNetInfos;
|
||||
List<WgNetInfoDTO> wgNetInfos;
|
||||
|
||||
//参会记录及资料
|
||||
List<WgMeetingInfo> wgMeetingInfos;
|
||||
|
||||
+66
-18
@@ -4,6 +4,10 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.wgDept.service.IWgDeptService;
|
||||
import com.adc.da.slrs.wgMeetingInfo.service.IWgMeetingInfoService;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelation;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.service.IWgMeetingUserRelationService;
|
||||
import com.adc.da.slrs.wgMeetingUserRelation.service.impl.WgMeetingUserRelationServiceImpl;
|
||||
import com.adc.da.slrs.wgNetInfo.entity.WgNetInfo;
|
||||
import com.adc.da.slrs.wgNetInfo.service.IWgNetInfoService;
|
||||
import com.adc.da.slrs.wgPayInfo.service.IWgPayInfoService;
|
||||
import com.adc.da.slrs.wgStandorpolicyInfo.service.IWgStandorpolicyInfoService;
|
||||
@@ -18,10 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -48,6 +49,8 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
||||
private IWgStandorpolicyInfoService wgStandorpolicyInfoService;
|
||||
@Autowired
|
||||
private WgWorkGroupDao wgWorkGroupDao;
|
||||
@Autowired
|
||||
private IWgMeetingUserRelationService wgMeetingUserRelationService;
|
||||
|
||||
|
||||
@Transactional
|
||||
@@ -56,18 +59,45 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
||||
WgWorkGroup wgWorkGroup=new WgWorkGroup();
|
||||
BeanUtils.copyProperties(wgWorkGroupDTO,wgWorkGroup);
|
||||
//存储集团参与情况
|
||||
boolean flag1=wgDeptService.saveBatch(wgWorkGroupDTO.getWgDepts());
|
||||
boolean flag=true;
|
||||
wgWorkGroup.setId(String.valueOf(UUID.randomUUID()));
|
||||
flag=wgWorkGroupService.save(wgWorkGroup);
|
||||
if (null!=wgWorkGroupDTO.getWgDepts()) {
|
||||
wgWorkGroupDTO.getWgDepts().forEach(wgDept -> {wgDept.setWgId(wgWorkGroup.getId());
|
||||
});
|
||||
flag=wgDeptService.saveBatch(wgWorkGroupDTO.getWgDepts());
|
||||
}
|
||||
//存储会议信息
|
||||
boolean flag2=wgMeetingInfoService.saveBatch(wgWorkGroupDTO.getWgMeetingInfos());
|
||||
if (null!=wgWorkGroupDTO.getWgMeetingInfos()) {
|
||||
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
|
||||
wgWorkGroupDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
|
||||
wgMeetingInfo.setWgId(wgWorkGroup.getId());
|
||||
wgMeetingInfo.getMeetingPeople().forEach(s -> {
|
||||
WgMeetingUserRelation wgMeetingUserRelation=new WgMeetingUserRelation();
|
||||
wgMeetingUserRelation.setMeetingId(wgMeetingInfo.getId());
|
||||
wgMeetingUserRelation.setUserId(s);
|
||||
});
|
||||
});
|
||||
flag = wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
|
||||
flag = wgMeetingInfoService.saveBatch(wgWorkGroupDTO.getWgMeetingInfos());
|
||||
}
|
||||
//存储秘书联系方式信息
|
||||
boolean flag3=wgNetInfoService.saveBatch(wgWorkGroupDTO.getWgNetInfos());
|
||||
if (null!=wgWorkGroupDTO.getWgNetInfos()) {
|
||||
wgWorkGroupDTO.getWgNetInfos().forEach(wgNetInfo -> {wgNetInfo.setWgId(wgWorkGroup.getId());});
|
||||
flag = wgNetInfoService.saveBatch(wgWorkGroupDTO.getWgNetInfos());
|
||||
}
|
||||
//支付信息
|
||||
boolean flag4=wgPayInfoService.saveBatch(wgWorkGroupDTO.getWgPayInfos());
|
||||
if (null!=wgWorkGroupDTO.getWgPayInfos()) {
|
||||
wgWorkGroupDTO.getWgPayInfos().forEach(wgPayInfo -> {wgPayInfo.setWgId(wgWorkGroup.getId());});
|
||||
flag = wgPayInfoService.saveBatch(wgWorkGroupDTO.getWgPayInfos());
|
||||
}
|
||||
//标准政策信息
|
||||
boolean flag5=wgStandorpolicyInfoService.saveBatch(wgWorkGroupDTO.getWgStandorpolicyInfos());
|
||||
if (null!=wgWorkGroupDTO.getWgStandorpolicyInfos()) {
|
||||
wgWorkGroupDTO.getWgStandorpolicyInfos().forEach(wgStandorpolicyInfo -> {wgStandorpolicyInfo.setWgId(wgWorkGroup.getId());});
|
||||
flag = wgStandorpolicyInfoService.saveBatch(wgWorkGroupDTO.getWgStandorpolicyInfos());
|
||||
}
|
||||
//先存储主数据
|
||||
boolean flag6=wgWorkGroupService.save(wgWorkGroup);
|
||||
if (flag1 && flag2 && flag3 && flag4 && flag5 && flag6 ) {
|
||||
if (flag ) {
|
||||
return "添加成功";
|
||||
}else {
|
||||
return "数据错误,添加失败";
|
||||
@@ -116,13 +146,31 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
||||
}else {
|
||||
WgWorkGroup wgWorkGroup=new WgWorkGroup();
|
||||
BeanUtils.copyProperties(wgWorkGroupShowDTO,wgWorkGroup);
|
||||
boolean flag1=wgWorkGroupService.updateById(wgWorkGroup);
|
||||
boolean flag2=wgDeptService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgDepts());
|
||||
boolean flag3=wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
|
||||
boolean flag4=wgNetInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgNetInfos());
|
||||
boolean flag5=wgPayInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgPayInfos());
|
||||
boolean flag6=wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgStandorpolicyInfos());
|
||||
if (flag1 && flag2 && flag3 && flag4 && flag5 && flag6){
|
||||
boolean flag = false;
|
||||
flag=wgWorkGroupService.updateById(wgWorkGroup);
|
||||
if (null!=wgWorkGroupShowDTO.getWgDepts()) {
|
||||
flag = wgDeptService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgDepts());
|
||||
}
|
||||
if (null!=wgWorkGroupShowDTO.getWgMeetingInfos()) {
|
||||
flag = wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
|
||||
}
|
||||
if (null!=wgWorkGroupShowDTO.getWgNetInfos()) {
|
||||
List<WgNetInfo> wgNetInfos=new ArrayList<>();
|
||||
wgWorkGroupShowDTO.getWgNetInfos().forEach(wgNetInfoDTO -> {
|
||||
WgNetInfo wgNetInfo=new WgNetInfo();
|
||||
BeanUtils.copyProperties(wgNetInfoDTO,wgNetInfo);
|
||||
wgNetInfos.add(wgNetInfo);
|
||||
});
|
||||
flag = wgNetInfoService.saveOrUpdateBatch(wgNetInfos);
|
||||
}
|
||||
if (null!=wgWorkGroupShowDTO.getWgPayInfos()){
|
||||
flag = wgPayInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgPayInfos());
|
||||
}
|
||||
if (null!=wgWorkGroupShowDTO.getWgStandorpolicyInfos()) {
|
||||
flag = wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgStandorpolicyInfos());
|
||||
}
|
||||
|
||||
if (flag){
|
||||
return Result.success("更新成功");
|
||||
}else {
|
||||
return Result.error("无法更新");
|
||||
|
||||
@@ -2,8 +2,12 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.wgDept.dao.WgDeptDao">
|
||||
|
||||
<select id="researchDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDept">
|
||||
select * from wg_dept where wg_dept.wg_id =#{data}
|
||||
<select id="researchDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDeptShow">
|
||||
select wg_dept.* ,ts_user.UNAME as name ,ts_user.PHONE as phone ,ts_user.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,ts_user.INSTITUTION_NAME as deptName
|
||||
from wg_dept
|
||||
left join ts_user on ts_user.ACCOUNT = wg_dept.dept_people_id
|
||||
where wg_dept.wg_id =#{data}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
+15
-1
@@ -2,7 +2,21 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.wgMeetingInfo.dao.WgMeetingInfoDao">
|
||||
|
||||
<select id="researchDatas" resultType="com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo">
|
||||
<resultMap id="WgMeetingInfos" type="com.adc.da.slrs.wgMeetingInfo.entity.WgMeetingInfo">
|
||||
|
||||
<id property="id" column="id"/>
|
||||
<result property="wgId" column="wg_id"/>
|
||||
<result property="meetingTime" column="meeting_time"/>
|
||||
<result property="meetingName" column="meeting_name"/>
|
||||
<result property="meetingReport" column="meeting_report"/>
|
||||
<result property="joinfile" column="joinfile"/>
|
||||
<result property="joinId" column="join_id"/>
|
||||
<association property="joinMeetingPeopleInfo" javaType="java.util.List" column="id"
|
||||
select="com.adc.da.slrs.wgMeetingUserRelation.dao.WgMeetingUserRelationDao.getMeetingPeoples"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="researchDatas" resultMap="WgMeetingInfos">
|
||||
select * from wg_meeting_info where wg_meeting_info.wg_id = #{data}
|
||||
</select>
|
||||
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<?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.adc.da.slrs.wgMeetingUserRelation.dao.WgMeetingUserRelationDao">
|
||||
|
||||
|
||||
<select id="getMeetingPeoples"
|
||||
resultType="com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow">
|
||||
select wg_meeting_user_relation.*,ts_user.UNAME as name from wg_meeting_user_relation
|
||||
left join ts_user on ts_user.ACCOUNT = wg_meeting_user_relation.user_id
|
||||
where wg_meeting_user_relation.meeting_id = #{meetId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -2,8 +2,12 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.wgNetInfo.dao.WgNetInfoDao">
|
||||
|
||||
<select id="researchDatas" resultType="com.adc.da.slrs.wgNetInfo.entity.WgNetInfo">
|
||||
select * from wg_net_info where wg_net_info.wg_id =#{data}
|
||||
<select id="researchDatas" resultType="com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO">
|
||||
select wg_net_info.net_id,ts_user.UNAME as name ,ts_user.PHONE as phone, ts_user.EMAIL as email
|
||||
,wg_net_info.id,wg_net_info.wg_id , wg_net_info.join_id
|
||||
from wg_net_info
|
||||
left join ts_user on ts_user.ACCOUNT = wg_net_info.net_id
|
||||
where wg_net_info.wg_id =#{data}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user