Commit 6bc7ac6e by wangjian

2025-09-24 wj 整体修改4

parent 065a1c38
...@@ -16,6 +16,7 @@ import com.qianhe.common.utils.DateUtils; ...@@ -16,6 +16,7 @@ import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.Vo.SjLhscVo; import com.qianhe.domain.Vo.SjLhscVo;
import com.qianhe.service.IGgFjbService;
import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -48,6 +49,8 @@ public class SjLhscController extends BaseController ...@@ -48,6 +49,8 @@ public class SjLhscController extends BaseController
{ {
@Autowired @Autowired
private ISjLhscService sjLhscService; private ISjLhscService sjLhscService;
@Autowired
private IGgFjbService fjbService;
/** /**
* 查询三基-例会上传列表(二级单位) * 查询三基-例会上传列表(二级单位)
...@@ -169,7 +172,14 @@ public class SjLhscController extends BaseController ...@@ -169,7 +172,14 @@ public class SjLhscController extends BaseController
sjLhsc.setTgjy(URLDecoder.decode(sjLhsc.getTgjy(), "utf-8")); sjLhsc.setTgjy(URLDecoder.decode(sjLhsc.getTgjy(), "utf-8"));
sjLhsc.setLdyq(URLDecoder.decode(sjLhsc.getLdyq(), "utf-8")); sjLhsc.setLdyq(URLDecoder.decode(sjLhsc.getLdyq(), "utf-8"));
sjLhsc.setCzwt(URLDecoder.decode(sjLhsc.getCzwt(), "utf-8")); sjLhsc.setCzwt(URLDecoder.decode(sjLhsc.getCzwt(), "utf-8"));
return toAjax(sjLhscService.insertSjLhsc(sjLhsc));
int i = sjLhscService.insertSjLhsc(sjLhsc);
String fileListStr1 = sjLhsc.getFileListStr1();
int i1 = fjbService.batchSaveFj(sjLhsc.getId()+"", "例会上传", "例会上传", fileListStr1);
return toAjax(i);
} }
/** /**
...@@ -184,6 +194,11 @@ public class SjLhscController extends BaseController ...@@ -184,6 +194,11 @@ public class SjLhscController extends BaseController
sjLhsc.setTgjy(URLDecoder.decode(sjLhsc.getTgjy(), "utf-8")); sjLhsc.setTgjy(URLDecoder.decode(sjLhsc.getTgjy(), "utf-8"));
sjLhsc.setLdyq(URLDecoder.decode(sjLhsc.getLdyq(), "utf-8")); sjLhsc.setLdyq(URLDecoder.decode(sjLhsc.getLdyq(), "utf-8"));
sjLhsc.setCzwt(URLDecoder.decode(sjLhsc.getCzwt(), "utf-8")); sjLhsc.setCzwt(URLDecoder.decode(sjLhsc.getCzwt(), "utf-8"));
String fileListStr1 = sjLhsc.getFileListStr1();
int i1 = fjbService.batchSaveFj(sjLhsc.getId()+"", "基层三册", "基层三册", fileListStr1);
return toAjax(sjLhscService.updateSjLhsc(sjLhsc)); return toAjax(sjLhscService.updateSjLhsc(sjLhsc));
} }
......
...@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.config.RuoYiConfig; import com.qianhe.common.config.RuoYiConfig;
import com.qianhe.common.constant.Constants; import com.qianhe.common.constant.Constants;
import com.qianhe.common.exception.BusinessException; import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import com.qianhe.common.utils.ip.IpUtils; import com.qianhe.common.utils.ip.IpUtils;
import com.qianhe.domain.GgFjb; import com.qianhe.domain.GgFjb;
...@@ -309,4 +310,31 @@ public class SjZdscController extends BaseController ...@@ -309,4 +310,31 @@ public class SjZdscController extends BaseController
sjZdsc.setZt("1"); sjZdsc.setZt("1");
return success(sjZdscService.pltj(sjZdsc)); return success(sjZdscService.pltj(sjZdsc));
} }
/**
* 查询 共享出来的 根据 gxqx这个字段 分别取
*/
@GetMapping("/gxList")
public TableDataInfo gxList(SjZdsc sjZdsc)
{
startPage();
sjZdsc.setNowUserName(SecurityUtils.getUsername());
sjZdsc.setNowUserDeptId(String.valueOf(SecurityUtils.getDeptId()));
List<SjZdsc> list = sjZdscService.gxList(sjZdsc);
return getDataTable(list);
}
/**
* 查询 门户上的 公开的
*/
@GetMapping("/gxgkList")
public TableDataInfo gxgkList(SjZdsc sjZdsc)
{
startPage();
sjZdsc.setNowUserName(SecurityUtils.getUsername());
sjZdsc.setNowUserDeptId(String.valueOf(SecurityUtils.getDeptId()));
List<SjZdsc> list = sjZdscService.gxgkList(sjZdsc);
return getDataTable(list);
}
} }
...@@ -125,4 +125,9 @@ public class SjLhsc extends BaseEntity ...@@ -125,4 +125,9 @@ public class SjLhsc extends BaseEntity
*/ */
private String jd; private String jd;
private String fileListStr1;//附件传递参数(名称路径)JSON格式
private List<GgFjb> fileList1;//附件列表
} }
...@@ -51,6 +51,10 @@ public class SjZdsc extends BaseEntity ...@@ -51,6 +51,10 @@ public class SjZdsc extends BaseEntity
private String xzcs; private String xzcs;
@Excel(name = "共享权限")
private String gxqx;
private String fileListStr1;//附件传递参数(名称路径)JSON格式 private String fileListStr1;//附件传递参数(名称路径)JSON格式
private List<GgFjb> fileList1;//附件列表 private List<GgFjb> fileList1;//附件列表
...@@ -59,5 +63,7 @@ public class SjZdsc extends BaseEntity ...@@ -59,5 +63,7 @@ public class SjZdsc extends BaseEntity
//传入参数 //传入参数
private String ids;// private String ids;//
private String nowUserName;//当前登录用户 账号
private String nowUserDeptId;//当前登录用户 单位id
} }
...@@ -26,6 +26,8 @@ public interface SjZdscMapper ...@@ -26,6 +26,8 @@ public interface SjZdscMapper
* @return 基层三册集合 * @return 基层三册集合
*/ */
public List<SjZdsc> selectSjZdscList(SjZdsc sjZdsc); public List<SjZdsc> selectSjZdscList(SjZdsc sjZdsc);
public List<SjZdsc> gxList(SjZdsc sjZdsc);
public List<SjZdsc> gxgkList(SjZdsc sjZdsc);
/** /**
* 新增基层三册 * 新增基层三册
......
...@@ -27,6 +27,8 @@ public interface ISjZdscService ...@@ -27,6 +27,8 @@ public interface ISjZdscService
* @return 基层三册集合 * @return 基层三册集合
*/ */
public List<SjZdsc> selectSjZdscList(SjZdsc sjZdsc); public List<SjZdsc> selectSjZdscList(SjZdsc sjZdsc);
public List<SjZdsc> gxList(SjZdsc sjZdsc);
public List<SjZdsc> gxgkList(SjZdsc sjZdsc);
/** /**
* 新增基层三册 * 新增基层三册
......
...@@ -6,17 +6,19 @@ import java.util.List; ...@@ -6,17 +6,19 @@ import java.util.List;
import com.qianhe.common.annotation.DataScope; import com.qianhe.common.annotation.DataScope;
import com.qianhe.common.utils.DateUtils; import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils; import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.*;
import com.qianhe.domain.Vo.SjLhscVo; import com.qianhe.domain.Vo.SjLhscVo;
import com.qianhe.domain.WdWdxx;
import com.qianhe.mapper.WdWdxxMapper; import com.qianhe.mapper.WdWdxxMapper;
import com.qianhe.service.IGgFjbService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Map;
import java.util.stream.Collectors;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.qianhe.domain.SjLhscWt;
import com.qianhe.mapper.SjLhscMapper; import com.qianhe.mapper.SjLhscMapper;
import com.qianhe.domain.SjLhsc;
import com.qianhe.service.ISjLhscService; import com.qianhe.service.ISjLhscService;
/** /**
...@@ -34,6 +36,9 @@ public class SjLhscServiceImpl implements ISjLhscService ...@@ -34,6 +36,9 @@ public class SjLhscServiceImpl implements ISjLhscService
@Autowired @Autowired
private WdWdxxMapper wdWdxxMapper; private WdWdxxMapper wdWdxxMapper;
@Autowired
private IGgFjbService fjbService;
/** /**
* 查询三基-例会上传 * 查询三基-例会上传
* *
...@@ -54,6 +59,18 @@ public class SjLhscServiceImpl implements ISjLhscService ...@@ -54,6 +59,18 @@ public class SjLhscServiceImpl implements ISjLhscService
wdWdxx.setFjlx("例会上传"); wdWdxx.setFjlx("例会上传");
List<WdWdxx> wdWdxxes = wdWdxxMapper.selectWdWdxxList(wdWdxx); List<WdWdxx> wdWdxxes = wdWdxxMapper.selectWdWdxxList(wdWdxx);
sjLhsc.setFileList(wdWdxxes); sjLhsc.setFileList(wdWdxxes);
//查询附件
List<GgFjb> fjlist = fjbService.selectFj(id,"例会上传");
Map<String, List<GgFjb>> map = fjlist.stream().collect(Collectors.groupingBy(GgFjb::getFJLX));
if(map.get("例会上传")!=null){
List<GgFjb> fileData = map.get("例会上传").stream().collect(Collectors.toList());
sjLhsc.setFileList1(fileData);
}
return sjLhsc; return sjLhsc;
} }
...@@ -67,13 +84,49 @@ public class SjLhscServiceImpl implements ISjLhscService ...@@ -67,13 +84,49 @@ public class SjLhscServiceImpl implements ISjLhscService
@DataScope(deptAlias = "d") @DataScope(deptAlias = "d")
public List<SjLhsc> selectSjLhscList(SjLhsc sjLhsc) public List<SjLhsc> selectSjLhscList(SjLhsc sjLhsc)
{ {
return sjLhscMapper.selectSjLhscList(sjLhsc); List<SjLhsc> rl = sjLhscMapper.selectSjLhscList(sjLhsc);
//查询附件
List<GgFjb> fjlistAll = fjbService.selectFjByMk("例会上传");
for(SjLhsc rt:rl){
Long id = rt.getId();
String ids = String.valueOf(id);
List<GgFjb> fjlist = fjlistAll.stream().filter(e->e.getYWID().equals(ids)).collect(Collectors.toList());
Map<String, List<GgFjb>> map = fjlist.stream().collect(Collectors.groupingBy(GgFjb::getFJLX));
if(map.get("例会上传")!=null){
List<GgFjb> fileData = new ArrayList<>(map.get("例会上传"));
rt.setFileList1(fileData);
}
}
return rl;
} }
@Override @Override
public List<SjLhsc> selectSjLhscList_main(SjLhsc sjLhsc) public List<SjLhsc> selectSjLhscList_main(SjLhsc sjLhsc)
{ {
return sjLhscMapper.selectSjLhscList_main(sjLhsc); List<SjLhsc> rl = sjLhscMapper.selectSjLhscList_main(sjLhsc);
//查询附件
List<GgFjb> fjlistAll = fjbService.selectFjByMk("例会上传");
for(SjLhsc rt:rl){
Long id = rt.getId();
String ids = String.valueOf(id);
List<GgFjb> fjlist = fjlistAll.stream().filter(e->e.getYWID().equals(ids)).collect(Collectors.toList());
Map<String, List<GgFjb>> map = fjlist.stream().collect(Collectors.groupingBy(GgFjb::getFJLX));
if(map.get("例会上传")!=null){
List<GgFjb> fileData = new ArrayList<>(map.get("例会上传"));
rt.setFileList1(fileData);
}
}
return rl;
} }
/** /**
...@@ -198,7 +251,26 @@ public class SjLhscServiceImpl implements ISjLhscService ...@@ -198,7 +251,26 @@ public class SjLhscServiceImpl implements ISjLhscService
@Override @Override
public List<SjLhsc> selectSjLhscLhgxList(SjLhsc sjLhsc) { public List<SjLhsc> selectSjLhscLhgxList(SjLhsc sjLhsc) {
return sjLhscMapper.selectSjLhscLhgxList(sjLhsc); List<SjLhsc> rl = sjLhscMapper.selectSjLhscLhgxList(sjLhsc);
//查询附件
List<GgFjb> fjlistAll = fjbService.selectFjByMk("例会上传");
for(SjLhsc rt:rl){
Long id = rt.getId();
String ids = String.valueOf(id);
List<GgFjb> fjlist = fjlistAll.stream().filter(e->e.getYWID().equals(ids)).collect(Collectors.toList());
Map<String, List<GgFjb>> map = fjlist.stream().collect(Collectors.groupingBy(GgFjb::getFJLX));
if(map.get("例会上传")!=null){
List<GgFjb> fileData = new ArrayList<>(map.get("例会上传"));
rt.setFileList1(fileData);
}
}
return rl;
} }
/** /**
......
...@@ -93,6 +93,7 @@ public class SjZdscServiceImpl implements ISjZdscService ...@@ -93,6 +93,7 @@ public class SjZdscServiceImpl implements ISjZdscService
@Override @Override
public int insertSjZdsc(SjZdsc sjZdsc) public int insertSjZdsc(SjZdsc sjZdsc)
{ {
sjZdsc.setCreateBy(SecurityUtils.getUsername());
sjZdsc.setCreateTime(DateUtils.getNowDate()); sjZdsc.setCreateTime(DateUtils.getNowDate());
return sjZdscMapper.insertSjZdsc(sjZdsc); return sjZdscMapper.insertSjZdsc(sjZdsc);
} }
...@@ -106,6 +107,7 @@ public class SjZdscServiceImpl implements ISjZdscService ...@@ -106,6 +107,7 @@ public class SjZdscServiceImpl implements ISjZdscService
@Override @Override
public int updateSjZdsc(SjZdsc sjZdsc) public int updateSjZdsc(SjZdsc sjZdsc)
{ {
sjZdsc.setUpdateBy(SecurityUtils.getUsername());
sjZdsc.setUpdateTime(DateUtils.getNowDate()); sjZdsc.setUpdateTime(DateUtils.getNowDate());
return sjZdscMapper.updateSjZdsc(sjZdsc); return sjZdscMapper.updateSjZdsc(sjZdsc);
} }
...@@ -143,4 +145,64 @@ public class SjZdscServiceImpl implements ISjZdscService ...@@ -143,4 +145,64 @@ public class SjZdscServiceImpl implements ISjZdscService
sjZdsc.setUpdateTime(DateUtils.getNowDate()); sjZdsc.setUpdateTime(DateUtils.getNowDate());
return sjZdscMapper.plxg(sjZdsc); return sjZdscMapper.plxg(sjZdsc);
} }
/**
* 查询 共享出来的 根据 gxqx这个字段 分别取
*/
@Override
@DataScope(deptAlias = "d")
public List<SjZdsc> gxList(SjZdsc sjZdsc)
{
List<SjZdsc> rl = sjZdscMapper.gxList(sjZdsc);
//查询附件
List<GgFjb> fjlistAll = fjbService.selectFjByMk("基层三册");
for(SjZdsc rt:rl){
Long id = rt.getId();
String ids = String.valueOf(id);
List<GgFjb> fjlist = fjlistAll.stream().filter(e->e.getYWID().equals(ids)).collect(Collectors.toList());
Map<String, List<GgFjb>> map = fjlist.stream().collect(Collectors.groupingBy(GgFjb::getFJLX));
if(map.get("基层三册")!=null){
List<GgFjb> fileData = map.get("基层三册").stream().collect(Collectors.toList());
rt.setFileList1(fileData);
}
}
return rl;
}
/**
* 查询 共享出来的 根据 gxqx这个字段 分别取
*/
@Override
@DataScope(deptAlias = "d")
public List<SjZdsc> gxgkList(SjZdsc sjZdsc)
{
List<SjZdsc> rl = sjZdscMapper.gxgkList(sjZdsc);
//查询附件
List<GgFjb> fjlistAll = fjbService.selectFjByMk("基层三册");
for(SjZdsc rt:rl){
Long id = rt.getId();
String ids = String.valueOf(id);
List<GgFjb> fjlist = fjlistAll.stream().filter(e->e.getYWID().equals(ids)).collect(Collectors.toList());
Map<String, List<GgFjb>> map = fjlist.stream().collect(Collectors.groupingBy(GgFjb::getFJLX));
if(map.get("基层三册")!=null){
List<GgFjb> fileData = map.get("基层三册").stream().collect(Collectors.toList());
rt.setFileList1(fileData);
}
}
return rl;
}
} }
...@@ -56,8 +56,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -56,8 +56,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
yxqk, jjwt, czwt, tgjy, yxqk, jjwt, czwt, tgjy,
ldyq, zt, a.dwjb, tjr, tjrq, ldyq, zt, a.dwjb, tjr, tjrq,
a.create_by, a.create_time, a.update_by, a.create_by, a.create_time, a.update_by,
a.update_time, remark, yl1, yl2, yl3, yl4, yl5,d.dept_name from sj_lhsc a a.update_time, remark, yl1, yl2, yl3, yl4, yl5,d.dept_name
left join sys_dept d on a.dept_id=d.dept_id from sj_lhsc a
left join sys_dept d on a.dept_id=d.dept_id
</sql> </sql>
<select id="selectSjLhscList" parameterType="SjLhsc" resultMap="SjLhscResult"> <select id="selectSjLhscList" parameterType="SjLhsc" resultMap="SjLhscResult">
......
...@@ -19,11 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -19,11 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="deptName" column="dept_name" /> <result property="deptName" column="dept_name" />
<result property="gxqx" column="gxqx" />
</resultMap> </resultMap>
<sql id="selectSjZdscVo"> <sql id="selectSjZdscVo">
select a.id, a.dept_id, a.lx, a.zdmc, a.bb, a.fjms, a.zt, a.xzcs, a.create_by, a.create_time, select a.id, a.dept_id, a.lx, a.zdmc, a.bb, a.fjms, a.zt, a.xzcs, a.create_by, a.create_time,
a.update_by, a.update_time, a.remark, a.update_by, a.update_time, a.remark, a.gxqx,
CONCAT(p.dept_name,'/',d.dept_name) dept_name CONCAT(p.dept_name,'/',d.dept_name) dept_name
from sj_zdsc a from sj_zdsc a
left join sys_dept d on a.dept_id=d.dept_id left join sys_dept d on a.dept_id=d.dept_id
...@@ -63,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -63,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="gxqx != null">gxqx,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if> <if test="deptId != null">#{deptId},</if>
...@@ -77,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -77,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="gxqx != null">#{gxqx},</if>
</trim> </trim>
</insert> </insert>
<update id="updateSjZdsc" parameterType="SjZdsc"> <update id="updateSjZdsc" parameterType="SjZdsc">
...@@ -94,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -94,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="gxqx != null">gxqx = #{gxqx},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
...@@ -123,7 +127,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -123,7 +127,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="gxqx != null">gxqx = #{gxqx},</if>
</trim> </trim>
where find_in_set(id, #{ids}) where find_in_set(id, #{ids})
</update> </update>
<select id="gxList" parameterType="SjZdsc" resultMap="SjZdscResult">
select * from (
<include refid="selectSjZdscVo"/>
where 1=1 and zt = '1' and gxqx = '仅自己' and a.create_by = #{nowUserName}
union
<include refid="selectSjZdscVo"/>
where 1=1 and zt = '1' and gxqx = '本单位' and a.dept_id = #{nowUserDeptId}
union
<include refid="selectSjZdscVo"/>
where 1=1 and zt = '1' and gxqx = '仅上级' and (a.dept_id = #{nowUserDeptId} or find_in_set(#{nowUserDeptId}, d.ancestors))
union
<include refid="selectSjZdscVo"/>
where 1=1 and zt = '1' and gxqx = '公开'
)
</select>
<select id="gxgkList" parameterType="SjZdsc" resultMap="SjZdscResult">
<include refid="selectSjZdscVo"/>
where 1=1 and zt = '1' and gxqx = '公开'
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment