工作组查询 修改
This commit is contained in:
+2
@@ -21,4 +21,6 @@ public interface WgStandorpolicyInfoDao extends BaseMapper<WgStandorpolicyInfo>
|
|||||||
|
|
||||||
List<WgStandorpolicyInfo> researchAllDatas(@Param(value = "type")String type);
|
List<WgStandorpolicyInfo> researchAllDatas(@Param(value = "type")String type);
|
||||||
|
|
||||||
|
List<WgStandorpolicyInfo> researchAllDatasPartTwo(@Param(value = "type")String type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+20
@@ -2,6 +2,7 @@ package com.adc.da.slrs.wgStandorpolicyInfo.entity;
|
|||||||
|
|
||||||
import com.adc.da.base.entity.BaseEntity;
|
import com.adc.da.base.entity.BaseEntity;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
@@ -32,31 +33,50 @@ public class WgStandorpolicyInfo extends BaseEntity {
|
|||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@ApiModelProperty(value = "工作组id")
|
@ApiModelProperty(value = "工作组id")
|
||||||
|
@TableField("wg_id")
|
||||||
private String wgId;
|
private String wgId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "关联标准政策id")
|
||||||
|
@TableField("stand_id")
|
||||||
|
private String standId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "政策/标准 类别")
|
@ApiModelProperty(value = "政策/标准 类别")
|
||||||
|
@TableField(exist = false)
|
||||||
private String categary;
|
private String categary;
|
||||||
|
|
||||||
@ApiModelProperty(value = "政策/标准 编号")
|
@ApiModelProperty(value = "政策/标准 编号")
|
||||||
|
@TableField(exist = false)
|
||||||
private String number;
|
private String number;
|
||||||
|
|
||||||
@ApiModelProperty(value = "政策/标准 年份")
|
@ApiModelProperty(value = "政策/标准 年份")
|
||||||
|
@TableField(exist = false)
|
||||||
private String year;
|
private String year;
|
||||||
|
|
||||||
@ApiModelProperty(value = "政策标准 名称")
|
@ApiModelProperty(value = "政策标准 名称")
|
||||||
|
@TableField(exist = false)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty(value = "政策/标准 英文名称")
|
@ApiModelProperty(value = "政策/标准 英文名称")
|
||||||
|
@TableField(exist = false)
|
||||||
private String usname;
|
private String usname;
|
||||||
|
|
||||||
@ApiModelProperty(value = "文本状态")
|
@ApiModelProperty(value = "文本状态")
|
||||||
|
@TableField(exist = false)
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
@ApiModelProperty(value = "参与制定情况")
|
@ApiModelProperty(value = "参与制定情况")
|
||||||
|
@TableField(exist = false)
|
||||||
private String joinDevelop;
|
private String joinDevelop;
|
||||||
|
|
||||||
@ApiModelProperty(value = "相关材料")
|
@ApiModelProperty(value = "相关材料")
|
||||||
|
@TableField(exist = false)
|
||||||
private String netDatum;
|
private String netDatum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "相关材料")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-1
@@ -25,6 +25,13 @@ public class WgStandorpolicyInfoServiceImpl extends ServiceImpl<WgStandorpolicyI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<WgStandorpolicyInfo> getAllDatas(String type) {
|
public List<WgStandorpolicyInfo> getAllDatas(String type) {
|
||||||
return wgStandorpolicyInfoDao.researchAllDatas(type);
|
List<WgStandorpolicyInfo> wgStandorpolicyInfos=wgStandorpolicyInfoDao.researchAllDatas(type);
|
||||||
|
if ("0".equals(type)) {
|
||||||
|
List<WgStandorpolicyInfo> wgStandorpolicyInfos1 = wgStandorpolicyInfoDao.researchAllDatasPartTwo(type);
|
||||||
|
wgStandorpolicyInfos1.forEach(wgStandorpolicyInfo -> wgStandorpolicyInfo.setDataType("3"));
|
||||||
|
wgStandorpolicyInfos.addAll(wgStandorpolicyInfos1);
|
||||||
|
}
|
||||||
|
wgStandorpolicyInfos.removeIf(wgStandorpolicyInfo -> null==wgStandorpolicyInfo.getName());
|
||||||
|
return wgStandorpolicyInfos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -38,6 +38,12 @@ public class WgWorkGroupController extends BaseController<WgWorkGroup> {
|
|||||||
return Result.success(wgWorkGroupService.saveDatas(wgWorkGroup));
|
return Result.success(wgWorkGroupService.saveDatas(wgWorkGroup));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加标准/政策节点数据")
|
||||||
|
@PostMapping("/addStand")
|
||||||
|
public ResponseMessage<Object> addResourceData(@RequestBody WgWorkGroupDTO wgWorkGroup){
|
||||||
|
return Result.success(wgWorkGroupService.saveStandDatas(wgWorkGroup));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("搜索工作组节点数据")
|
@ApiOperation("搜索工作组节点数据")
|
||||||
@GetMapping("/researchData")
|
@GetMapping("/researchData")
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ public interface IWgWorkGroupService extends IService<WgWorkGroup> {
|
|||||||
|
|
||||||
String saveDatas(WgWorkGroupDTO wgWorkGroupDTO);
|
String saveDatas(WgWorkGroupDTO wgWorkGroupDTO);
|
||||||
|
|
||||||
|
String saveStandDatas(WgWorkGroupDTO wgWorkGroupDTO);
|
||||||
|
|
||||||
WgWorkGroupShowDTO researchData(String type);
|
WgWorkGroupShowDTO researchData(String type);
|
||||||
|
|
||||||
//优化查询接口 速度
|
//优化查询接口 速度
|
||||||
|
|||||||
+28
-1
@@ -87,7 +87,7 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
|||||||
wgMeetingUserRelations.add(wgMeetingUserRelation);
|
wgMeetingUserRelations.add(wgMeetingUserRelation);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
flag = wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
|
wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
|
||||||
flag = wgMeetingInfoService.saveBatch(wgWorkGroupDTO.getWgMeetingInfos());
|
flag = wgMeetingInfoService.saveBatch(wgWorkGroupDTO.getWgMeetingInfos());
|
||||||
}
|
}
|
||||||
//存储秘书联系方式信息
|
//存储秘书联系方式信息
|
||||||
@@ -119,6 +119,30 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String saveStandDatas(WgWorkGroupDTO wgWorkGroupDTO) {
|
||||||
|
if (null!=wgWorkGroupDTO.getWgStandorpolicyInfos() && wgWorkGroupDTO.getWgStandorpolicyInfos().size()>0){
|
||||||
|
List<WgWorkGroup> wgWorkGroups=new ArrayList<>();
|
||||||
|
wgWorkGroupDTO.getWgStandorpolicyInfos().forEach(wgStandorpolicyInfo -> {
|
||||||
|
WgWorkGroup wgWorkGroup=new WgWorkGroup();
|
||||||
|
BeanUtils.copyProperties(wgWorkGroupDTO,wgWorkGroup);
|
||||||
|
wgWorkGroup.setId(String.valueOf(UUID.randomUUID()));
|
||||||
|
wgStandorpolicyInfo.setWgId(wgWorkGroup.getId());
|
||||||
|
wgWorkGroups.add(wgWorkGroup);
|
||||||
|
});
|
||||||
|
|
||||||
|
boolean flag=wgWorkGroupService.saveOrUpdateBatch(wgWorkGroups);
|
||||||
|
boolean flag1=wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupDTO.getWgStandorpolicyInfos());
|
||||||
|
if (flag && flag1){
|
||||||
|
return "添加成功";
|
||||||
|
}else {
|
||||||
|
return "添加失败";
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return "数据有误,请检查数据";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WgWorkGroupShowDTO researchData(String type) {
|
public WgWorkGroupShowDTO researchData(String type) {
|
||||||
//构建最初的节点 用来向下搜索
|
//构建最初的节点 用来向下搜索
|
||||||
@@ -209,13 +233,16 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//处理标准政策数据
|
||||||
if (null!=wgStandorpolicyInfos && wgStandorpolicyInfos.size()>0) {
|
if (null!=wgStandorpolicyInfos && wgStandorpolicyInfos.size()>0) {
|
||||||
wgStandorpolicyInfos.forEach(wgStandorpolicyInfo -> {
|
wgStandorpolicyInfos.forEach(wgStandorpolicyInfo -> {
|
||||||
if (null!=wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).getWgStandorpolicyInfos()) {
|
if (null!=wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).getWgStandorpolicyInfos()) {
|
||||||
|
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setName(wgStandorpolicyInfo.getName());
|
||||||
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).getWgStandorpolicyInfos().add(wgStandorpolicyInfo);
|
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).getWgStandorpolicyInfos().add(wgStandorpolicyInfo);
|
||||||
}else {
|
}else {
|
||||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos1=new ArrayList<>();
|
List<WgStandorpolicyInfo> wgStandorpolicyInfos1=new ArrayList<>();
|
||||||
wgStandorpolicyInfos1.add(wgStandorpolicyInfo);
|
wgStandorpolicyInfos1.add(wgStandorpolicyInfo);
|
||||||
|
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setName(wgStandorpolicyInfo.getName());
|
||||||
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setWgStandorpolicyInfos(wgStandorpolicyInfos1);
|
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setWgStandorpolicyInfos(wgStandorpolicyInfos1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+27
-1
@@ -8,8 +8,34 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo">
|
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo">
|
||||||
select * from wg_standorpolicy_info
|
select wg_standorpolicy_info.id ,wg_standorpolicy_info.wg_id , wg_standorpolicy_info.stand_id
|
||||||
|
<if test="type == 0 ">
|
||||||
|
, sar_standards_info.STAND_NAME as name ,sar_standards_info.STAND_TYPE as dataType
|
||||||
|
</if>
|
||||||
|
<if test="type == 1 ">
|
||||||
|
,sar_laws_stand_info.LAWS_NAME as name
|
||||||
|
</if>
|
||||||
|
from wg_standorpolicy_info
|
||||||
left join wg_work_group on wg_work_group.id = wg_standorpolicy_info.wg_id
|
left join wg_work_group on wg_work_group.id = wg_standorpolicy_info.wg_id
|
||||||
|
<if test="type == 0">
|
||||||
|
left join sar_standards_info on sar_standards_info.ID = wg_standorpolicy_info.stand_id
|
||||||
|
</if>
|
||||||
|
<if test="type == 1">
|
||||||
|
left join sar_laws_stand_info on sar_laws_stand_info.ID = wg_standorpolicy_info.stand_id
|
||||||
|
</if>
|
||||||
|
where wg_work_group.type = #{type}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="researchAllDatasPartTwo" resultType="com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo">
|
||||||
|
select wg_standorpolicy_info.id ,wg_standorpolicy_info.wg_id , wg_standorpolicy_info.stand_id
|
||||||
|
<if test="type == 0 ">
|
||||||
|
, sar_bussioness_stand.STAND_NAME as name
|
||||||
|
</if>
|
||||||
|
from wg_standorpolicy_info
|
||||||
|
left join wg_work_group on wg_work_group.id = wg_standorpolicy_info.wg_id
|
||||||
|
<if test="type == 0">
|
||||||
|
left join sar_bussioness_stand on sar_bussioness_stand.ID = wg_standorpolicy_info.stand_id
|
||||||
|
</if>
|
||||||
where wg_work_group.type = #{type}
|
where wg_work_group.type = #{type}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -22,10 +22,10 @@
|
|||||||
<!--select="com.adc.da.slrs.wgDept.dao.WgDeptDao.researchDatas"/>-->
|
<!--select="com.adc.da.slrs.wgDept.dao.WgDeptDao.researchDatas"/>-->
|
||||||
<!--<association property="wgNetInfos" javaType="java.util.List" column="id"-->
|
<!--<association property="wgNetInfos" javaType="java.util.List" column="id"-->
|
||||||
<!--select="com.adc.da.slrs.wgNetInfo.dao.WgNetInfoDao.researchDatas"/>-->
|
<!--select="com.adc.da.slrs.wgNetInfo.dao.WgNetInfoDao.researchDatas"/>-->
|
||||||
<association property="wgMeetingInfos" javaType="java.util.List" column="id"
|
<!--<association property="wgMeetingInfos" javaType="java.util.List" column="id"-->
|
||||||
select="com.adc.da.slrs.wgMeetingInfo.dao.WgMeetingInfoDao.researchDatas"/>
|
<!--select="com.adc.da.slrs.wgMeetingInfo.dao.WgMeetingInfoDao.researchDatas"/>-->
|
||||||
<association property="children" javaType="java.util.List" column="id"
|
<!--<association property="children" javaType="java.util.List" column="id"-->
|
||||||
select="researchDownLevel"/>
|
<!--select="researchDownLevel"/>-->
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
select * from wg_work_group where wg_work_group.pid = #{data} and wg_work_group.status = #{status}
|
select * from wg_work_group where wg_work_group.pid = #{data} and wg_work_group.status = #{status}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="researchAllData" resultType="com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO">
|
<select id="researchAllData" resultMap="WgWorkGroups">
|
||||||
select * from wg_work_group where wg_work_group.type =#{type}
|
select * from wg_work_group where wg_work_group.type =#{type}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user