Commit 187cebeb by wangqi

体系贯通

parent 8810a0ca
......@@ -199,6 +199,18 @@ public class SysDept extends BaseEntity
this.children = children;
}
public String getDwjb()
{
return dwjb;
}
public void settDwjb(String dwjb)
{
this.dwjb = dwjb;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -240,6 +240,14 @@ public class SysDeptServiceImpl implements ISysDeptService
public int insertDept(SysDept dept)
{
SysDept info = deptMapper.selectDeptById(dept.getParentId());
String dwjb = info.getDwjb();
if(StringUtils.isNotEmpty(dwjb)) {
int number = Integer.parseInt(dwjb) + 1;
dept.setDwjb(number+"");
}else{
dept.setDwjb("1");
}
// 如果父节点不为正常状态,则不允许新增子节点
if (!UserConstants.DEPT_NORMAL.equals(info.getStatus()))
{
......@@ -259,6 +267,13 @@ public class SysDeptServiceImpl implements ISysDeptService
public int updateDept(SysDept dept)
{
SysDept newParentDept = deptMapper.selectDeptById(dept.getParentId());
String dwjb = newParentDept.getDwjb();
if(StringUtils.isNotEmpty(dwjb)) {
int number = Integer.parseInt(dwjb) + 1;
dept.setDwjb(number+"");
}else{
dept.setDwjb("0");
}
SysDept oldDept = deptMapper.selectDeptById(dept.getDeptId());
if (StringUtils.isNotNull(newParentDept) && StringUtils.isNotNull(oldDept))
{
......
......@@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="orderNum" column="order_num" />
<result property="leader" column="leader" />
<result property="status" column="dept_status" />
<result property="dwjb" column="dwjb" />
</resultMap>
<resultMap id="RoleResult" type="SysRole">
......@@ -48,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,d.dwjb,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
......
......@@ -314,7 +314,7 @@ public class SjFybpZbController extends BaseController
sysDeptCb.setDeptId(sjFybpZb.getDeptId());
SysDeptCb deptCb = sysDeptCbMapper.getInfoBydeptId(sysDeptCb);
if(deptCb==null){
sjFybpZb.setJl("单位基础信息未维护,请到部门管理中进行设置!");
sjFybpZb.setJl("单位基础信息未维护,请到部门管理中进行设置!");
}else {
if(StringUtils.isNotEmpty( deptCb.getDwlx() )){
String dwlx = deptCb.getDwlx();
......
......@@ -57,37 +57,37 @@ public class SjLhscController extends BaseController
public TableDataInfo list(SjLhsc sjLhsc)
{
startPage();
String nd="";
if(StringUtils.isNotEmpty(sjLhsc.getNd())){
nd=sjLhsc.getNd();
}
String startJd="";
String endJd="";
if(StringUtils.isNotEmpty(sjLhsc.getJd())){
String jd=sjLhsc.getJd();
if("1".equals(jd)){
startJd=nd+"-01";
endJd=nd+"-03";
}else if("2".equals(jd)){
startJd=nd+"-04";
endJd=nd+"-06";
}if("3".equals(jd)){
startJd=nd+"-07";
endJd=nd+"-09";
}if("4".equals(jd)){
startJd=nd+"-10";
endJd=nd+"-12";
String startJd="";
String endJd="";
if(StringUtils.isNotEmpty(sjLhsc.getJd())){
String jd=sjLhsc.getJd();
if("1".equals(jd)){
startJd=nd+"-01";
endJd=nd+"-03";
}else if("2".equals(jd)){
startJd=nd+"-04";
endJd=nd+"-06";
}if("3".equals(jd)){
startJd=nd+"-07";
endJd=nd+"-09";
}if("4".equals(jd)){
startJd=nd+"-10";
endJd=nd+"-12";
}else{
startJd=nd+"-01";
endJd=nd+"-12";
}
}else{
startJd=nd+"-01";
endJd=nd+"-12";
}
}else{
startJd=nd+"-01";
endJd=nd+"-12";
sjLhsc.setStartJd(startJd);
sjLhsc.setEndJd(endJd);
}
sjLhsc.setStartJd(startJd);
sjLhsc.setEndJd(endJd);
List<SjLhsc> list = sjLhscService.selectSjLhscList(sjLhsc);
return getDataTable(list);
......@@ -104,34 +104,33 @@ public class SjLhscController extends BaseController
String nd="";
if(StringUtils.isNotEmpty(sjLhsc.getNd())){
nd=sjLhsc.getNd();
}
String startJd="";
String endJd="";
if(StringUtils.isNotEmpty(sjLhsc.getJd())){
String jd=sjLhsc.getJd();
if("1".equals(jd)){
startJd=nd+"-01";
endJd=nd+"-03";
}else if("2".equals(jd)){
startJd=nd+"-04";
endJd=nd+"-06";
}if("3".equals(jd)){
startJd=nd+"-07";
endJd=nd+"-09";
}if("4".equals(jd)){
startJd=nd+"-10";
endJd=nd+"-12";
String startJd="";
String endJd="";
if(StringUtils.isNotEmpty(sjLhsc.getJd())){
String jd=sjLhsc.getJd();
if("1".equals(jd)){
startJd=nd+"-01";
endJd=nd+"-03";
}else if("2".equals(jd)){
startJd=nd+"-04";
endJd=nd+"-06";
}if("3".equals(jd)){
startJd=nd+"-07";
endJd=nd+"-09";
}if("4".equals(jd)){
startJd=nd+"-10";
endJd=nd+"-12";
}else{
startJd=nd+"-01";
endJd=nd+"-12";
}
}else{
startJd=nd+"-01";
endJd=nd+"-12";
}
}else{
startJd=nd+"-01";
endJd=nd+"-12";
sjLhsc.setStartJd(startJd);
sjLhsc.setEndJd(endJd);
}
sjLhsc.setStartJd(startJd);
sjLhsc.setEndJd(endJd);
List<SjLhsc> list = sjLhscService.selectSjLhscList(sjLhsc);
return getDataTable(list);
}
......
......@@ -218,7 +218,7 @@ public class SjFybpServiceImpl implements ISjFybpService
}
@Override
// @DataScope(deptAlias = "d")
@DataScope(deptAlias = "d")
public List<SjFybp> getFygz(SjFybp sjFybp) {
return sjFybpMapper.getFygz(sjFybp);
}
......
......@@ -154,15 +154,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getFygz" resultMap="SjFybpResult">
select a.id zb_id,a.dept_id,d.dept_name,a.fyrq,a.fyje fyzje,b.id,b.fymc,b.fylx,b.fyje,b.fyms,IFNULL(sum(c.syje),0) ysyje from sj_fybp_zb a
left join sj_fybp b on a.id=b.zb_id
left join sj_fybp_wh c on b.id=c.fybp_id
left join sys_dept d on a.dept_id=d.dept_id
where 1=1
left join sj_fybp b on a.id=b.zb_id
left join sj_fybp_wh c on b.id=c.fybp_id
left join sys_dept d on a.dept_id=d.dept_id
where 1=1
and a.zt = '已批复'
<if test="deptId != null and deptId != ''"> and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="fylx != null and fylx != ''"> and b.fylx = #{fylx}</if>
<if test="fymc != null and fymc != ''"> and b.fymc like concat('%', #{fymc}, '%')</if>
<if test="fyrq != null and fyrq != ''"> and a.fyrq = #{fyrq}</if>
${params.dataScope}
group by b.id order by a.sprq desc
</select>
<select id="getFygzById" resultMap="SjFybpResult">
......@@ -183,6 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_dept d on a.dept_id=d.dept_id
left join sys_dict_data e on b.fylx=e.dict_value and e.dict_type='fy_lx'
where 1=1
and a.zt = '已批复'
<if test="deptId != null and deptId != ''"> and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="fyrq != null and fyrq != ''"> and a.fyrq =#{fyrq}</if>
<if test="fylx != null and fylx != ''"> and b.fylx = #{fylx}</if>
......@@ -198,6 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_dept d on a.dept_id=d.dept_id
where 1=1
and a.zt = '已批复'
<if test="deptId != null and deptId != ''"> and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="fyrq != null and fyrq != ''"> and a.fyrq =#{fyrq}</if>
<if test="fylx != null and fylx != ''"> and b.fylx = #{fylx}</if>
......
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