Commit 5239f447 by wangjian

2025-12-03 wj 修改

parent 428313fd
......@@ -215,7 +215,17 @@ public class SjBzxxController extends BaseController
dptmp.setYgrs(bz.getRs());//一般是班组
dptmp.setBzid(bz.getId());
dptmp.setIsbz("班组");//是否班组
depts.add(dptmp);
Long deptId = bz.getDeptId();
if(deptId != null) {
long depts_if = depts.stream().filter(e->deptId.equals(e.getDeptId())).count();
if (depts_if == 1) {
System.out.println("存在上级单位id:" + deptId);
depts.add(dptmp);
}
}
//depts.add(dptmp);
}
return success(depts);
......
......@@ -311,7 +311,8 @@ public class SjFybpController extends BaseController
Cell cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(xh);
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(tmp.getDeptName());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(tmp.getAbztqzded());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(tmp.getYsyje().toString());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(tmp.getXmje() == null ? "":String.valueOf(tmp.getXmje()));
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(tmp.getYsyje() == null ? "":tmp.getYsyje().toString());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(tmp.getJd());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(tmp.getXmzc1());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(tmp.getXmzcmx1());
......@@ -332,6 +333,7 @@ public class SjFybpController extends BaseController
mergeCellsByColumn(sheet,1, 5);
mergeCellsByColumn(sheet,2, 5);
mergeCellsByColumn(sheet,3, 5);
mergeCellsByColumn(sheet,4, 5);
if(cbList.size()>0){
sheet.getRow(1).getCell(2).setCellValue(cbList.get(0).getFyrq() + "年");
......
......@@ -4,12 +4,12 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.constant.HttpStatus;
import com.qianhe.domain.SjBzxx;
import com.qianhe.domain.SjGfjsZsdwkhpj;
import com.qianhe.domain.SjGfjsZsdwwtcj;
import com.qianhe.domain.*;
import com.qianhe.service.IGgFjbService;
import com.qianhe.service.ISjBzxxService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -25,7 +25,6 @@ import com.qianhe.common.annotation.Log;
import com.qianhe.common.core.controller.BaseController;
import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.common.enums.BusinessType;
import com.qianhe.domain.SjGfjsXjbz;
import com.qianhe.service.ISjGfjsXjbzService;
import com.qianhe.common.utils.poi.ExcelUtil;
import com.qianhe.common.core.page.TableDataInfo;
......@@ -44,6 +43,8 @@ public class SjGfjsXjbzController extends BaseController
private ISjGfjsXjbzService sjGfjsXjbzService;
@Autowired
private ISjBzxxService sjBzxxService;
@Autowired
private IGgFjbService fjbService;
/**
* 查询三基 规范建设 星级班组列表
......@@ -65,6 +66,17 @@ public class SjGfjsXjbzController extends BaseController
Long deptId = sjGfjsXjbz.getDeptId();
String nd = sjGfjsXjbz.getNd();
//查询附件
List<GgFjb> fjlist = fjbService.selectFj(deptId,"规范建设-星级班组");
Map<String, List<GgFjb>> map2 = fjlist.stream().collect(Collectors.groupingBy(GgFjb::getFJLX));
if(map2.get(nd)!=null){
List<GgFjb> fileData = map2.get(nd).stream().collect(Collectors.toList());
//rt.setFileList1(fileData);
map.put("khpjFjs", fileData);
}
//查询 指定单位下 指定年 已保存的 班组星级 数据
List<SjGfjsXjbz> list = sjGfjsXjbzService.selectSjGfjsXjbzList(sjGfjsXjbz);
if(list.size()<=0){//没有需要插入一个初始的
......@@ -79,6 +91,7 @@ public class SjGfjsXjbzController extends BaseController
xj.setNd(nd);
xj.setBzlx(bz.getBzlx());
xj.setBzmc(bz.getBzmc());
xj.setFdjb(bz.getRs());//班组人数
xj.setZt("0");
xjbzsList.add(xj);
}
......@@ -159,4 +172,15 @@ public class SjGfjsXjbzController extends BaseController
return toAjax(sjGfjsXjbzService.plxg(fjx));
}
//上传附件
@PostMapping("/scfj")
public AjaxResult scfj(@RequestBody SjGfjsXjbz sjZdsc)
{
String fileListStr1 = sjZdsc.getFileListStr1();
int i1 = fjbService.batchSaveFj(sjZdsc.getDeptId()+"", sjZdsc.getNd(), "规范建设-星级班组", fileListStr1);
return toAjax(i1);
}
}
......@@ -570,6 +570,7 @@ public class SjGfjsZsdwkhpjController extends BaseController
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(zsdwkhpj.getFdjb());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(zsdwkhpj.getPm());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(zsdwkhpj.getDeptLx());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(zsdwkhpj.getQnpjqk());
lastRow++;
}
//合并行
......
......@@ -6,6 +6,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.qianhe.common.annotation.Excel;
import com.qianhe.common.core.domain.BaseEntity;
import java.util.List;
/**
* 三基 规范建设 星级班组对象 sj_gfjs_xjbz
*
......@@ -21,50 +23,58 @@ public class SjGfjsXjbz extends BaseEntity
private Long id;
/** 班组id */
@Excel(name = "班组id")
private Long bzId;
/** 年度 */
@Excel(name = "年度")
private String nd;
@Excel(name = "直属单位")
private String zsdwmc;
@Excel(name = "基层单位")
private String jcdwmc;
/** 单位id */
@Excel(name = "单位id")
private Long deptId;
/** 上级单位id */
@Excel(name = "上级单位id")
private Long parentDeptId;
/** 年度 */
@Excel(name = "年度")
private String nd;
/** 班组类型 */
@Excel(name = "班组类型")
private String bzlx;
/** 班组名称 */
@Excel(name = "班组名称")
private String bzmc;
/** 班组类型 */
@Excel(name = "班组类型")
private String bzlx;
/** 分档级别 改为 班组人数 */
@Excel(name = "班组人数")
private String fdjb;
/** 星级 */
@Excel(name = "星级")
@Excel(name = "星级班组/其他")
private String xj;
/** 星级描述 */
@Excel(name = "星级描述")
@Excel(name = "备注")
private String xjms;
/** 排名 可自调整 */
@Excel(name = "排名 可自调整")
private Long pm;
/** 状态 0 未提交 1 已提交 */
@Excel(name = "状态 0 未提交 1 已提交")
private String zt;
/** 分档级别 */
@Excel(name = "分档级别")
private String fdjb;
private String ids;
private String fileListStr1;//附件传递参数(名称路径)JSON格式
private List<GgFjb> fileList1;//附件列表
}
......@@ -193,5 +193,6 @@ public class SjGfjsZsdwkhpjZb extends BaseEntity
* ABCD
*/
private String fdjb;
private String qnpjqk;//去年 评价情况
}
......@@ -120,69 +120,69 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.jcdwrs,
s.zsdwrs
FROM (
-- 原查询结果作为基础表t
select
a.dept_id zsdwid,a.dept_name zsdwmc,a.ancestors zsdw_ancestors,a.order_num zsdwpx,b.dwlx zsdwlx,
b.dept_id jcdwid,b.parent_id,b.dept_name jcdwmc,b.ancestors jcdw_ancestors,b.order_num jcdwpx,b.dwlx jcdwlx,
b.bzid,b.bzmc,b.bzlx,case when b.bzrs is null then a.jcrysl else bzrs end bzrs,a.jcrysl zsdwrysl,b.jcrysl
jcdwyrsl
from (
select a.dept_id,a.dept_name,a.ancestors,a.order_num,b.dwlx,b.jcrysl
from sys_dept a
left join sys_dept_cb b on a.dept_id=b.dept_id
where dwjb='3'
and status='0'
and del_flag='0'
-- 原查询结果作为基础表t
select
a.dept_id zsdwid,a.dept_name zsdwmc,a.ancestors zsdw_ancestors,a.order_num zsdwpx,a.dwlx zsdwlx,
b.dept_id jcdwid,b.parent_id,b.dept_name jcdwmc,b.ancestors jcdw_ancestors,b.order_num jcdwpx,b.dwlx jcdwlx,
b.bzid,b.bzmc,b.bzlx,case when b.bzrs is null then a.jcrysl else bzrs end bzrs,a.jcrysl zsdwrysl,b.jcrysl
jcdwyrsl
from (
select a.dept_id,a.dept_name,a.ancestors,a.order_num,b.dwlx,b.jcrysl
from sys_dept a
left join sys_dept_cb b on a.dept_id=b.dept_id
where dwjb='3'
and status='0'
and del_flag='0'
<!-- 数据范围过滤 -->
${params.dataScope}
<!-- 数据范围过滤 -->
${params.dataScope}
order by order_num
)a
left join (
select a.dept_id,a.parent_id,a.dept_name,a.ancestors,a.order_num,b.dwlx,c.id bzid,c.bzmc,c.bzlx,c.rs
bzrs,b.jcrysl
from sys_dept a
left join sys_dept_cb b on a.dept_id=b.dept_id
left join sj_bzxx c on a.dept_id=c.dept_id
where dwjb='4'
and status='0'
and del_flag='0'
order by order_num
) b on a.dept_id=b.parent_id
order by order_num
)a
left join (
select a.dept_id,a.parent_id,a.dept_name,a.ancestors,a.order_num,b.dwlx,c.id bzid,c.bzmc,c.bzlx,c.rs
bzrs,b.jcrysl
from sys_dept a
left join sys_dept_cb b on a.dept_id=b.dept_id
left join sj_bzxx c on a.dept_id=c.dept_id
where dwjb='4'
and status='0'
and del_flag='0'
order by order_num
) b on a.dept_id=b.parent_id
) t
-- 关联计算jcdwrs(同一jcdwid的bzrs总和)
LEFT JOIN (
select
dept_id jcdwid,
SUM(bzrs) jcdwrs
from (
select a.dept_id,c.rs bzrs
from sys_dept a
left join sj_bzxx c on a.dept_id=c.dept_id
where dwjb='4'
and status='0'
and del_flag='0'
) temp
group by dept_id
select
dept_id jcdwid,
SUM(bzrs) jcdwrs
from (
select a.dept_id,c.rs bzrs
from sys_dept a
left join sj_bzxx c on a.dept_id=c.dept_id
where dwjb='4'
and status='0'
and del_flag='0'
) temp
group by dept_id
) b ON t.jcdwid = b.jcdwid
-- 关联计算zsdwrs(同一zsdwid的jcdwrs总和)
LEFT JOIN (
select
parent_id zsdwid,
SUM(jcdwrs) zsdwrs
from (
select
a.parent_id,
SUM(c.rs) jcdwrs
from sys_dept a
left join sj_bzxx c on a.dept_id=c.dept_id
where dwjb='4'
and status='0'
and del_flag='0'
group by a.dept_id,a.parent_id
) temp
group by parent_id
select
parent_id zsdwid,
SUM(jcdwrs) zsdwrs
from (
select
a.parent_id,
SUM(c.rs) jcdwrs
from sys_dept a
left join sj_bzxx c on a.dept_id=c.dept_id
where dwjb='4'
and status='0'
and del_flag='0'
group by a.dept_id,a.parent_id
) temp
group by parent_id
) s ON t.zsdwid = s.zsdwid
where 1=1
<if test="zsdwlx != null and zsdwlx != ''">and t.zsdwlx = #{zsdwlx}</if>
......
......@@ -52,10 +52,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="pm" column="pm" />
<result property="zt" column="zt" />
<result property="fdjb" column="fdjb" />
<result property="qnpjqk" column="qnpjqk" />
</resultMap>
<sql id="selectSjGfjsZsdwkhpjZbVo">
select id,
a.dept_id,
parent_dept_id,
......@@ -96,10 +96,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
yl2,
yl3,
yl4,
yl5,d.dept_name,p.dept_name parent_name, a.pm, a.zt,a.fdjb
yl5,d.dept_name,p.dept_name parent_name, a.pm, a.zt,a.fdjb,
( select distinct pjqk from sj_nd_dwpjqk q
WHERE q.dept_id = a.dept_id and q.nd = a.nd-1 order by nd desc limit 1 ) qnpjqk
from sj_gfjs_zsdwkhpj_zb a
left join sys_dept d on a.dept_id=d.dept_id
left join sys_dept p on a.parent_dept_id=p.dept_id </sql>
left join sys_dept p on a.parent_dept_id=p.dept_id
</sql>
<select id="selectSjGfjsZsdwkhpjZbList" parameterType="SjGfjsZsdwkhpjZb" resultMap="SjGfjsZsdwkhpjZbResult">
<include refid="selectSjGfjsZsdwkhpjZbVo"/>
......
......@@ -22,37 +22,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="jcdwmc" column="jcdwmc" />
<result property="zsdwmc" column="zsdwmc" />
</resultMap>
<sql id="selectSjGfjsXjbzVo">
select id, bz_id, dept_id, parent_dept_id, nd, bzlx, bzmc, xj, xjms, pm, zt, fdjb ,
select a.id, a.bz_id, a.dept_id, a.parent_dept_id, a.nd, a.bzlx, a.bzmc, a.xj, a.xjms, a.pm, a.zt, a.fdjb ,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.remark
a.remark,
d.dept_name jcdwmc, d2.dept_name zsdwmc
from sj_gfjs_xjbz a
left join sys_dept d on a.dept_id = d.dept_id
left join sys_dept d2 on d.parent_id = d2.dept_id
</sql>
<select id="selectSjGfjsXjbzList" parameterType="SjGfjsXjbz" resultMap="SjGfjsXjbzResult">
<include refid="selectSjGfjsXjbzVo"/>
<where>
<if test="bzId != null "> and bz_id = #{bzId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="parentDeptId != null "> and parent_dept_id = #{parentDeptId}</if>
<if test="nd != null and nd != ''"> and nd = #{nd}</if>
<if test="bzlx != null and bzlx != ''"> and bzlx = #{bzlx}</if>
<if test="bzmc != null and bzmc != ''"> and bzmc = #{bzmc}</if>
<if test="xj != null and xj != ''"> and xj = #{xj}</if>
<if test="xjms != null and xjms != ''"> and xjms = #{xjms}</if>
<if test="pm != null "> and pm = #{pm}</if>
<if test="zt != null and zt != ''"> and zt = #{zt}</if>
<if test="fdjb != null and fdjb != ''"> and fdjb = #{fdjb}</if>
<if test="bzId != null "> and a.bz_id = #{bzId}</if>
<if test="deptId != null "> and a.dept_id = #{deptId}</if>
<if test="parentDeptId != null "> and a.parent_dept_id = #{parentDeptId}</if>
<if test="nd != null and nd != ''"> and a.nd = #{nd}</if>
<if test="bzlx != null and bzlx != ''"> and a.bzlx = #{bzlx}</if>
<if test="bzmc != null and bzmc != ''"> and a.bzmc = #{bzmc}</if>
<if test="xj != null and xj != ''"> and a.xj = #{xj}</if>
<if test="xjms != null and xjms != ''"> and a.xjms = #{xjms}</if>
<if test="pm != null "> and a.pm = #{pm}</if>
<if test="zt != null and zt != ''"> and a.zt = #{zt}</if>
<if test="fdjb != null and fdjb != ''"> and a.fdjb = #{fdjb}</if>
</where>
</select>
<select id="selectSjGfjsXjbzById" parameterType="Long" resultMap="SjGfjsXjbzResult">
<include refid="selectSjGfjsXjbzVo"/>
where id = #{id}
where a.id = #{id}
</select>
<insert id="insertSjGfjsXjbz" parameterType="SjGfjsXjbz" useGeneratedKeys="true" keyProperty="id">
......
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