拆分查看页,导出程序异常白名单加入 工作组编辑

This commit is contained in:
yuezhihang
2021-11-10 15:52:43 +08:00
parent 139911ff51
commit 333143549f
8 changed files with 64 additions and 19 deletions
@@ -75,6 +75,9 @@ public class WebMvcConfig implements WebMvcConfigurer {
addInterceptor.excludePathPatterns("/api/sarStandProjectLibrary/exportStandAttrInfoExcel");
// 拆分查看页,导出程序异常
addInterceptor.excludePathPatterns("/api/lawss/sarFileSplitItems/exportSplitInfoZip");
// //测试接口使用
// addInterceptor.excludePathPatterns("/api/**");
@@ -1,6 +1,9 @@
package com.adc.da.slrs.wgMeetingUserRelation.entity;
import com.adc.da.base.entity.BaseEntity;
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;
@@ -19,14 +22,17 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="WgMeetingUserRelation对象", description="")
@TableName("wg_meeting_user_relation")
public class WgMeetingUserRelation extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "会议id")
@TableId("meeting_id")
private String meetingId;
@ApiModelProperty(value = "人员id")
@TableField("user_id")
private String userId;
@@ -47,12 +47,12 @@ public class WgWorkGroupController extends BaseController<WgWorkGroup> {
@ApiOperation("删除工作组节点数据")
@DeleteMapping("/deleteData")
public ResponseMessage<Object> deleteData(@Param(value = "id") String id){
return wgWorkGroupService.deleteData(id);
public ResponseMessage<Object> deleteData(@Param(value = "id") String id, @Param("meetingId")List<String> meetingId){
return wgWorkGroupService.deleteData(id,meetingId);
}
@ApiOperation("修改工作组节点数据")
@DeleteMapping("/updateData")
@PostMapping("/updateData")
public ResponseMessage<Object> updateData(@RequestBody WgWorkGroupShowDTO wgWorkGroupShowDTO){
return wgWorkGroupService.updateData(wgWorkGroupShowDTO);
}
@@ -2,16 +2,19 @@ package com.adc.da.slrs.wgWorkGroup.entity;
import com.adc.da.base.entity.BaseEntity;
import java.time.LocalDateTime;
import java.util.Date;
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>
@@ -35,28 +38,30 @@ public class WgWorkGroup extends BaseEntity {
private String id;
@ApiModelProperty(value = "父级id")
@TableId("pid")
@TableField("pid")
private String pid;
@ApiModelProperty(value = "编号")
@TableId("number")
@TableField("number")
private String number;
@ApiModelProperty(value = "名称")
@TableId("name")
@TableField("name")
private String name;
@ApiModelProperty(value = "性质(0:标委会,1:分标委,2:工作组,3:政策)")
@TableId("nature")
@TableField("nature")
private String nature;
@ApiModelProperty(value = "状态(0:流程中,1:流程已通过)")
@TableId("status")
@TableField("status")
private String status;
@ApiModelProperty(value = "换届时间")
@TableField("change_time")
private LocalDateTime changeTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date changeTime;
@ApiModelProperty(value = "标准化工作领域")
@TableField("stander_area")
@@ -74,5 +79,5 @@ public class WgWorkGroup extends BaseEntity {
@TableField("level")
private String level;
//可能缺少性质,状态两个字段
}
@@ -10,13 +10,16 @@ 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;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
@@ -54,7 +57,9 @@ public class WgWorkGroupDTO extends BaseEntity {
private String status;
@ApiModelProperty(value = "换届时间")
private LocalDateTime changeTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date changeTime;
@ApiModelProperty(value = "标准化工作领域")
private String standerArea;
@@ -7,11 +7,13 @@ 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 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 java.time.LocalDateTime;
import java.util.Date;
@@ -52,6 +54,8 @@ public class WgWorkGroupShowDTO extends BaseEntity {
private String status;
@ApiModelProperty(value = "换届时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date changeTime;
@ApiModelProperty(value = "标准化工作领域")
@@ -22,7 +22,7 @@ public interface IWgWorkGroupService extends IService<WgWorkGroup> {
WgWorkGroupShowDTO researchData(String type);
ResponseMessage<Object> deleteData(String id);
ResponseMessage<Object> deleteData(String id,List<String> meetingId);
ResponseMessage<Object> updateData(WgWorkGroupShowDTO wgWorkGroupShowDTO);
@@ -71,11 +71,13 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
if (null!=wgWorkGroupDTO.getWgMeetingInfos()) {
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
wgWorkGroupDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
wgMeetingInfo.setId(String.valueOf(UUID.randomUUID()));
wgMeetingInfo.setWgId(wgWorkGroup.getId());
wgMeetingInfo.getMeetingPeople().forEach(s -> {
WgMeetingUserRelation wgMeetingUserRelation=new WgMeetingUserRelation();
wgMeetingUserRelation.setMeetingId(wgMeetingInfo.getId());
wgMeetingUserRelation.setUserId(s);
wgMeetingUserRelations.add(wgMeetingUserRelation);
});
});
flag = wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
@@ -116,7 +118,7 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
}
@Override
public ResponseMessage<Object> deleteData(String id) {
public ResponseMessage<Object> deleteData(String id,List<String> ids) {
List<WgWorkGroup> wgWorkGroupShowDTOS=wgWorkGroupDao.researchDownCheck(id,"1");
List<WgWorkGroupShowDTO> wgWorkGroups=wgWorkGroupDao.researchDownLevel(id);
if (null!=wgWorkGroupShowDTOS && wgWorkGroupShowDTOS.size()>0 && null!= wgWorkGroups && wgWorkGroups.size()>0){
@@ -134,6 +136,9 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
wgNetInfoService.removeByMap(columnMap);
wgMeetingInfoService.removeByMap(columnMap);
wgDeptService.removeByMap(columnMap);
if (null!=ids && ids.size()>0) {
wgMeetingUserRelationService.removeByIds(ids);
}
return Result.success("删除成功");
}
}
@@ -147,14 +152,31 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
WgWorkGroup wgWorkGroup=new WgWorkGroup();
BeanUtils.copyProperties(wgWorkGroupShowDTO,wgWorkGroup);
boolean flag = false;
flag=wgWorkGroupService.updateById(wgWorkGroup);
if (null!=wgWorkGroupShowDTO.getWgDepts()) {
flag=wgWorkGroupService.saveOrUpdate(wgWorkGroup);
if (null!=wgWorkGroupShowDTO.getWgDepts() && wgWorkGroupShowDTO.getWgDepts().size()>0) {
flag = wgDeptService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgDepts());
}
if (null!=wgWorkGroupShowDTO.getWgMeetingInfos()) {
if (null!=wgWorkGroupShowDTO.getWgMeetingInfos() && wgWorkGroupShowDTO.getWgMeetingInfos().size()>0) {
List<String> removeMeet=new ArrayList<>();
List<WgMeetingUserRelation> wgMeetingUserRelations=new ArrayList<>();
wgWorkGroupShowDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
wgMeetingInfo.getMeetingPeople().forEach(s -> {
WgMeetingUserRelation wgMeetingUserRelation=new WgMeetingUserRelation();
wgMeetingUserRelation.setUserId(s);
wgMeetingUserRelation.setMeetingId(wgMeetingInfo.getId());
wgMeetingUserRelations.add(wgMeetingUserRelation);
});
removeMeet.add(wgMeetingInfo.getId());
});
if (!removeMeet.isEmpty()) {
wgMeetingUserRelationService.removeByIds(removeMeet);
wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
}
flag = wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
}
if (null!=wgWorkGroupShowDTO.getWgNetInfos()) {
if (null!=wgWorkGroupShowDTO.getWgNetInfos() && wgWorkGroupShowDTO.getWgNetInfos().size()>0) {
List<WgNetInfo> wgNetInfos=new ArrayList<>();
wgWorkGroupShowDTO.getWgNetInfos().forEach(wgNetInfoDTO -> {
WgNetInfo wgNetInfo=new WgNetInfo();
@@ -163,10 +185,10 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
});
flag = wgNetInfoService.saveOrUpdateBatch(wgNetInfos);
}
if (null!=wgWorkGroupShowDTO.getWgPayInfos()){
if (null!=wgWorkGroupShowDTO.getWgPayInfos() && wgWorkGroupShowDTO.getWgPayInfos().size()>0){
flag = wgPayInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgPayInfos());
}
if (null!=wgWorkGroupShowDTO.getWgStandorpolicyInfos()) {
if (null!=wgWorkGroupShowDTO.getWgStandorpolicyInfos() && wgWorkGroupShowDTO.getWgStandorpolicyInfos().size()>0) {
flag = wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgStandorpolicyInfos());
}