Commit 0888247c by wangqi

帮扶组问题维护

parent 1c23f6ab
......@@ -7,6 +7,7 @@ import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.core.domain.entity.SysRole;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.SjBfzbfdx;
import com.qianhe.domain.SjBfzwh;
import com.qianhe.service.ISjBfzwhService;
import com.qianhe.system.service.ISysDeptService;
......@@ -160,4 +161,14 @@ public class SjBfzwhController extends BaseController
List<SysDept> depts = deptService.selectDeptList_sy(new SysDept());
return success(sjBfzwhService.buildBfdwTreeSelect(depts));
}
/**
* 查询帮扶对象下拉框
*/
@GetMapping("/bfdxlist")
public TableDataInfo selectBfdxlist(SjBfzbfdx sjBfzbfdx)
{
List<SjBfzbfdx> list = sjBfzwhService.selectBfdxlist(sjBfzbfdx);
return getDataTable(list);
}
}
......@@ -11,6 +11,7 @@ import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.SjBfzbfdx;
import com.qianhe.domain.SjBfzwh;
import com.qianhe.domain.SjZdbfKhpjbzCb;
import com.qianhe.domain.SjZdbfZsdwwtcj;
......@@ -66,23 +67,8 @@ public class SjZdbfbfzjcController extends BaseController
@GetMapping("/list")
public TableDataInfo list(SjZdbfZsdwwtcj sjZdbfZsdwwtcj)
{
List<SjZdbfZsdwwtcj> list = new ArrayList<>();
// 获取当前用户名
String username = SecurityUtils.getUsername();
if(username.equals("admin") || username.equals("sjgly") ){
sjZdbfZsdwwtcj.setJcjb("帮扶组检查");
startPage();
list = sjZdbfJcdwwtcjService.selectSjZdbfZsdwwtcjList(sjZdbfZsdwwtcj);
}else {
sjZdbfZsdwwtcj.setCreateBy(username);
sjZdbfZsdwwtcj.setJcjb("帮扶组检查");
startPage();
list = sjZdbfJcdwwtcjService.selectSjZdbfZsdwwtcjList(sjZdbfZsdwwtcj);
}
sjZdbfZsdwwtcj.setJcjb("帮扶组检查");
List<SjZdbfZsdwwtcj> list = sjZdbfJcdwwtcjService.selectSjZdbfZsdwwtcjList(sjZdbfZsdwwtcj);
return getDataTable(list);
}
......@@ -98,7 +84,7 @@ public class SjZdbfbfzjcController extends BaseController
OutputStream out = null;
InputStream in = null;
try {
in =this.getClass().getResourceAsStream("/static/zsdwwtcj.xlsx");
in =this.getClass().getResourceAsStream("/static/bfzwtjc.xlsx");
exl = WorkbookFactory.create(in);
out = response.getOutputStream();
response.reset();
......@@ -179,7 +165,7 @@ public class SjZdbfbfzjcController extends BaseController
@PreAuthorize("@ss.hasPermi('system:sjZdbfbfzjc:importData')")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{
public AjaxResult importData(MultipartFile file, boolean updateSupport, SjZdbfZsdwwtcj sjZdbfZsdwwtcj) throws Exception{
XSSFWorkbook workbook = null;
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
......@@ -284,6 +270,7 @@ public class SjZdbfbfzjcController extends BaseController
zsdwwtcj.setJcjb("帮扶组检查");
zsdwwtcj.setCreateTime(DateUtils.getNowDate());
zsdwwtcj.setCreateBy(SecurityUtils.getUsername());
zsdwwtcj.setYl3(sjZdbfZsdwwtcj.getYl3());
list.add(zsdwwtcj);
}
if(list.size()>0){
......@@ -301,6 +288,21 @@ public class SjZdbfbfzjcController extends BaseController
}
/**
* 查询指导帮扶-帮扶组检查列表
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfbfzjc:list')")
@GetMapping("/list_bfz")
public TableDataInfo list_bfz(SjZdbfZsdwwtcj sjZdbfZsdwwtcj)
{
sjZdbfZsdwwtcj.setJcjb("帮扶组检查");
List<SjZdbfZsdwwtcj> list = sjZdbfJcdwwtcjService.selectSjZdbfZsdwwtcjList_bfz(sjZdbfZsdwwtcj);
return getDataTable(list);
}
}
......@@ -25,6 +25,8 @@ public class SjBfzbfdx extends BaseEntity
@Excel(name = "部门id")
private Long deptId;
private String deptName;
public void setId(Long id)
{
this.id = id;
......@@ -51,4 +53,12 @@ public class SjBfzbfdx extends BaseEntity
.append("deptId", getDeptId())
.toString();
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
}
......@@ -74,4 +74,6 @@ public interface SjBfzwhMapper
public int deleteBfzBfdxById(Long id);
public int deleteBfzBfdx(Long[] ids);
public List<SjBfzbfdx> selectBfdxlist(SjBfzbfdx sjBfzbfdx);
}
......@@ -28,6 +28,8 @@ public interface SjZdbfbfzjcMapper
*/
public List<SjZdbfZsdwwtcj> selectSjZdbfZsdwwtcjList(SjZdbfZsdwwtcj sjZdbfZsdwwtcj);
public List<SjZdbfZsdwwtcj> selectSjZdbfZsdwwtcjList_bfz(SjZdbfZsdwwtcj sjZdbfZsdwwtcj);
/**
* 新增指导帮扶-扶组检查帮
*
......
......@@ -2,6 +2,7 @@ package com.qianhe.service;
import com.qianhe.common.core.domain.TreeSelect;
import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.domain.SjBfzbfdx;
import com.qianhe.domain.SjBfzwh;
import java.util.List;
......@@ -82,4 +83,6 @@ public interface ISjBfzwhService
*/
public List<TreeSelect> buildBfdwTreeSelect(List<SysDept> depts);
public List<SysDept> buildBfdwxTree(List<SysDept> menus);
public List<SjBfzbfdx> selectBfdxlist(SjBfzbfdx sjBfzbfdx);
}
......@@ -28,6 +28,8 @@ public interface ISjZdbfbfzjcService
*/
public List<SjZdbfZsdwwtcj> selectSjZdbfZsdwwtcjList(SjZdbfZsdwwtcj sjZdbfZsdwwtcj);
public List<SjZdbfZsdwwtcj> selectSjZdbfZsdwwtcjList_bfz(SjZdbfZsdwwtcj sjZdbfZsdwwtcj);
/**
* 新增指导帮扶-帮扶组检查
*
......
......@@ -254,4 +254,12 @@ public class SjBfzwhServiceImpl implements ISjBfzwhService
return getChildList(list, t).size() > 0;
}
@Override
public List<SjBfzbfdx> selectBfdxlist(SjBfzbfdx sjBfzbfdx)
{
return sjBfzwhMapper.selectBfdxlist(sjBfzbfdx);
}
}
......@@ -49,6 +49,12 @@ public class SjZdbfbfzjcServiceImpl implements ISjZdbfbfzjcService
return sjZdbfJcdwwtcjMapper.selectSjZdbfZsdwwtcjList(sjZdbfZsdwwtcj);
}
@Override
public List<SjZdbfZsdwwtcj> selectSjZdbfZsdwwtcjList_bfz(SjZdbfZsdwwtcj sjZdbfZsdwwtcj)
{
return sjZdbfJcdwwtcjMapper.selectSjZdbfZsdwwtcjList_bfz(sjZdbfZsdwwtcj);
}
/**
* 新增指导帮扶-帮扶组检查
*
......
......@@ -17,6 +17,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deptNames" column="deptNames" />
</resultMap>
<resultMap type="SjBfzbfdx" id="SjBfzbfdxResult">
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" />
</resultMap>
<sql id="selectSjBfzwhVo">
select a.id, a.bfzmc, a.lxr, a.nd, a.lrr, s.nick_name lxrname, a.lrsj, a.xgr, a.xgsj, a.bz
from sj_bfzwh a
......@@ -130,4 +137,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<select id="selectBfdxlist" parameterType="SjBfzbfdx" resultMap="SjBfzbfdxResult">
select bfdx.id, bfdx.dept_id, CONCAT(p.dept_name,'/',c.dept_name) dept_name from sj_bfzbfdx bfdx
LEFT JOIN sys_dept c on bfdx.dept_id = c.dept_id
LEFT JOIN sys_dept p on c.parent_id = p.dept_id
<where>
<if test="id != null "> and id = #{id}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
</where>
</select>
</mapper>
......@@ -88,6 +88,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by a.rq desc
</select>
<select id="selectSjZdbfZsdwwtcjList_bfz" parameterType="SjZdbfZsdwwtcj" resultMap="SjZdbfZsdwwtcjResult">
<include refid="selectSjZdbfZsdwwtcjVo"/>
<where>
<if test="deptId != null ">and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="rq != null and rq != ''"> and rq = #{rq}</if>
<if test="jcjb != null and jcjb != ''"> and jcjb = #{jcjb}</if>
<if test="wtmc != null and wtmc != ''"> and wtmc = #{wtmc}</if>
<if test="khnr != null and khnr != ''"> and khnr = #{khnr}</if>
<if test="khxd != null and khxd != ''"> and khxd = #{khxd}</if>
<if test="pjbzid != null and pjbzid != ''"> and pjbzid = #{pjbzid}</if>
<if test="pjbzmc != null and pjbzmc != ''"> and pjbzmc = #{pjbzmc}</if>
<if test="zgzrr != null and zgzrr != ''"> and zgzrr = #{zgzrr}</if>
<if test="zgcs != null and zgcs != ''"> and zgcs = #{zgcs}</if>
<if test="zgqx != null and zgqx != ''"> and zgqx = #{zgqx}</if>
<if test="zgzt != null and zgzt != ''"> and zgzt = #{zgzt}</if>
<if test="yl1 != null and yl1 != ''"> and yl1 = #{yl1}</if>
<if test="yl2 != null and yl2 != ''"> and yl2 = #{yl2}</if>
<if test="yl3 != null and yl3 != ''"> and yl3 = #{yl3}</if>
<if test="yl4 != null and yl4 != ''"> and yl4 = #{yl4}</if>
<if test="yl5 != null and yl5 != ''"> and yl5 = #{yl5}</if>
<if test="startRq != null and startRq != ''"> and rq >= #{startRq}</if>
<if test="endRq != null and endRq != ''"> and rq &lt;= #{endRq}</if>
</where>
order by a.rq desc
</select>
<select id="selectSjZdbfZsdwwtcjById" parameterType="Long" resultMap="SjZdbfZsdwwtcjResult">
<include refid="selectSjZdbfZsdwwtcjVo"/>
where a.id = #{id}
......
......@@ -33,37 +33,71 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSjZdbfZsdwwtcjVo">
select id,
select a.id,
a.dept_id,
rq,
jcjb,
wtmc,
khnr,
khxd,
pjbzid,
pjbzmc,
zgzrr,
zgcs,
zgqx,
zgzt,
a.rq,
a.jcjb,
a.wtmc,
a.khnr,
a.khxd,
a.pjbzid,
a.pjbzmc,
a.zgzrr,
a.zgcs,
a.zgqx,
a.zgzt,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
remark,
yl1,
yl2,
yl3,
yl4,
yl5, d.dept_name,d.dept_lx
a.remark,
a.yl1,
a.yl2,
a.yl3,
a.yl4,
a.yl5,
d.dept_name,d.dept_lx,
b.bfzmc as yl3name
from sj_zdbf_zsdwwtcj a
left join sys_dept d on a.dept_id=d.dept_id
left join sj_bfzwh b on a.yl3 = b.id
</sql>
<select id="selectSjZdbfZsdwwtcjList" parameterType="SjZdbfZsdwwtcj" resultMap="SjZdbfZsdwwtcjResult">
<include refid="selectSjZdbfZsdwwtcjVo"/>
<where>
<if test="deptId != null ">and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="rq != null and rq != ''"> and a.rq = #{rq}</if>
<if test="jcjb != null and jcjb != ''"> and a.jcjb = #{jcjb}</if>
<if test="wtmc != null and wtmc != ''"> and a.wtmc = #{wtmc}</if>
<if test="khnr != null and khnr != ''"> and a.khnr = #{khnr}</if>
<if test="khxd != null and khxd != ''"> and a.khxd = #{khxd}</if>
<if test="pjbzid != null and pjbzid != ''"> and a.pjbzid = #{pjbzid}</if>
<if test="pjbzmc != null and pjbzmc != ''"> and a.pjbzmc = #{pjbzmc}</if>
<if test="zgzrr != null and zgzrr != ''"> and a.zgzrr = #{zgzrr}</if>
<if test="zgcs != null and zgcs != ''"> and a.zgcs = #{zgcs}</if>
<if test="zgqx != null and zgqx != ''"> and a.zgqx = #{zgqx}</if>
<if test="zgzt != null and zgzt != ''"> and a.zgzt = #{zgzt}</if>
<if test="yl1 != null and yl1 != ''"> and a.yl1 = #{yl1}</if>
<if test="yl2 != null and yl2 != ''"> and a.yl2 = #{yl2}</if>
<if test="yl3 != null and yl3 != ''"> and a.yl3 = #{yl3}</if>
<if test="yl4 != null and yl4 != ''"> and a.yl4 = #{yl4}</if>
<if test="yl5 != null and yl5 != ''"> and a.yl5 = #{yl5}</if>
<if test="createBy != null and createBy != ''"> and a.create_by = #{createBy}</if>
<if test="startRq != null and startRq != ''"> and rq >= #{startRq}</if>
<if test="endRq != null and endRq != ''"> and rq &lt;= #{endRq}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by a.rq desc
</select>
<select id="selectSjZdbfZsdwwtcjList_bfz" parameterType="SjZdbfZsdwwtcj" resultMap="SjZdbfZsdwwtcjResult">
<include refid="selectSjZdbfZsdwwtcjVo"/>
<where>
<if test="deptId != null ">and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="rq != null and rq != ''"> and rq = #{rq}</if>
<if test="jcjb != null and jcjb != ''"> and jcjb = #{jcjb}</if>
<if test="wtmc != null and wtmc != ''"> and wtmc = #{wtmc}</if>
......@@ -83,10 +117,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null and createBy != ''"> and a.create_by = #{createBy}</if>
<if test="startRq != null and startRq != ''"> and rq >= #{startRq}</if>
<if test="endRq != null and endRq != ''"> and rq &lt;= #{endRq}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by a.rq desc
</select>
......
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