update code
parent
0036578c0e
commit
5fd792ded5
|
@ -2,6 +2,8 @@ package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
@ -65,6 +67,14 @@ public class SysLoginController
|
||||||
// 权限集合
|
// 权限集合
|
||||||
Set<String> permissions = permissionService.getMenuPermission(user);
|
Set<String> permissions = permissionService.getMenuPermission(user);
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
List<SysRole> list= user.getRoles();
|
||||||
|
long roleId= list.get(0).getRoleId();
|
||||||
|
for(SysRole role :list){
|
||||||
|
if(role.getRoleId()<roleId){
|
||||||
|
roleId=role.getRoleId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ajax.put("roleId",roleId);
|
||||||
ajax.put("user", user);
|
ajax.put("user", user);
|
||||||
ajax.put("roles", roles);
|
ajax.put("roles", roles);
|
||||||
ajax.put("permissions", permissions);
|
ajax.put("permissions", permissions);
|
||||||
|
|
|
@ -21,6 +21,11 @@ import com.ruoyi.common.utils.PageUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.sql.SqlUtil;
|
import com.ruoyi.common.utils.sql.SqlUtil;
|
||||||
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
|
|
||||||
|
import javax.servlet.http.Cookie;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web层通用数据处理
|
* web层通用数据处理
|
||||||
|
@ -91,6 +96,45 @@ public class BaseController
|
||||||
return rspData;
|
return rspData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从Cookie中获取B类用户的项目IDS,b.监理单位、总包单位、分包单位用户不展示项目概况菜单,二级菜单只展示自已参与的项目
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected List<Long> getProjectIds(){
|
||||||
|
String ids=getCookie("__ids__");
|
||||||
|
List<Long> list=new ArrayList<>();
|
||||||
|
if(StringUtils.isNotEmpty(ids)){
|
||||||
|
String[] tmps= ids.split(",");
|
||||||
|
for(String s:tmps){
|
||||||
|
if(s.length()>0){
|
||||||
|
try{
|
||||||
|
list.add(Long.parseLong(s));
|
||||||
|
}catch (Exception e){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected HttpServletRequest getRequest(){
|
||||||
|
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||||
|
return servletRequestAttributes.getRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String getCookie(String key){
|
||||||
|
Cookie[] cookies =getRequest().getCookies();
|
||||||
|
if(cookies!=null && cookies.length>0){
|
||||||
|
for(Cookie cookie :cookies){
|
||||||
|
if(cookie.getName().toLowerCase().equals(key.toLowerCase())){
|
||||||
|
return cookie.getValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回成功
|
* 返回成功
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.ruoyi.common.core.domain;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
@ -17,6 +18,18 @@ public class BaseEntity implements Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public List<Long> getPrjIds() {
|
||||||
|
return prjIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrjIds(List<Long> prjIds) {
|
||||||
|
this.prjIds = prjIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存项目ID列表,用于B类用户 b.监理单位、总包单位、分包单位用户不展示项目概况菜单,二级菜单只展示自已参与的项目
|
||||||
|
*/
|
||||||
|
private List<Long> prjIds;
|
||||||
/** 搜索值 */
|
/** 搜索值 */
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private String searchValue;
|
private String searchValue;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.common.utils;
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
|
@ -7,6 +8,8 @@ import com.ruoyi.common.constant.HttpStatus;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全服务工具类
|
* 安全服务工具类
|
||||||
*
|
*
|
||||||
|
@ -21,7 +24,7 @@ public class SecurityUtils
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return getLoginUser().getUserId();
|
return getLoginUser().getUserId();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -29,6 +32,24 @@ public class SecurityUtils
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static long getRoleId(){
|
||||||
|
try
|
||||||
|
{
|
||||||
|
List<SysRole> list= getLoginUser().getUser().getRoles();
|
||||||
|
long roleId= list.get(0).getRoleId();
|
||||||
|
for(SysRole role :list){
|
||||||
|
if(role.getRoleId()<roleId){
|
||||||
|
roleId=role.getRoleId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return roleId;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
throw new ServiceException("获取RoleID异常", HttpStatus.UNAUTHORIZED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取部门ID
|
* 获取部门ID
|
||||||
**/
|
**/
|
||||||
|
@ -117,4 +138,9 @@ public class SecurityUtils
|
||||||
{
|
{
|
||||||
return userId != null && 1L == userId;
|
return userId != null && 1L == userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isUserB() {
|
||||||
|
long roleId=getRoleId();
|
||||||
|
return 5==roleId || 6==roleId || 7==roleId || 99==roleId||15==roleId||16==roleId||17==roleId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,4 +140,6 @@ public interface SysDeptMapper
|
||||||
* @return 部门信息
|
* @return 部门信息
|
||||||
*/
|
*/
|
||||||
public SysDept selectDeptByUserName(String userName);
|
public SysDept selectDeptByUserName(String userName);
|
||||||
|
|
||||||
|
public List<SysDept> getRootDept(Long deptId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,4 +130,6 @@ public interface ISysDeptService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public Long getZGSDeptId(Long deptId);
|
public Long getZGSDeptId(Long deptId);
|
||||||
|
|
||||||
|
public Long getRootDept(Long deptId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,6 +321,18 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getRootDept(Long deptId) {
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
return 0l;
|
||||||
|
}
|
||||||
|
List<SysDept> list=deptMapper.getRootDept(deptId);
|
||||||
|
if(list.size()>0){
|
||||||
|
return list.get(0).getDeptId();
|
||||||
|
}
|
||||||
|
return 0l;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 递归列表
|
* 递归列表
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -114,33 +114,77 @@
|
||||||
LEFT JOIN (SELECT category,COUNT(1) cnt FROM vw_flow_all WHERE finishTime IS NOT NULL
|
LEFT JOIN (SELECT category,COUNT(1) cnt FROM vw_flow_all WHERE finishTime IS NOT NULL
|
||||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||||
GROUP BY category) b ON a.dict_value=b.category
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and businessKey in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
GROUP BY category) b ON a.dict_value=b.category
|
||||||
LEFT JOIN (SELECT category,COUNT(1) cnt FROM vw_flow_all WHERE finishTime IS NULL AND taskName!='提交申请'
|
LEFT JOIN (SELECT category,COUNT(1) cnt FROM vw_flow_all WHERE finishTime IS NULL AND taskName!='提交申请'
|
||||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||||
GROUP BY category) c ON a.dict_value=c.category
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and businessKey in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
GROUP BY category) c ON a.dict_value=c.category
|
||||||
</select>
|
</select>
|
||||||
<select id="groupByUnit" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
|
<select id="groupByUnit" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
|
||||||
SELECT cat taskName, COUNT(1) assigneeId FROM (
|
SELECT cat taskName, COUNT(1) assigneeId FROM (
|
||||||
SELECT *,'总包单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '总包%'
|
SELECT *,'总包单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '总包%'
|
||||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and businessKey in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
UNION
|
UNION
|
||||||
SELECT *,'监理单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '监理%'
|
SELECT *,'监理单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '监理%'
|
||||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and businessKey in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
UNION
|
UNION
|
||||||
SELECT *,'设计单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '设计%'
|
SELECT *,'设计单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '设计%'
|
||||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and businessKey in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
UNION
|
UNION
|
||||||
SELECT *,'甲方代表' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '甲方%'
|
SELECT *,'甲方代表' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '甲方%'
|
||||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and businessKey in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
UNION
|
UNION
|
||||||
SELECT *,'子公司' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '工程%'
|
SELECT *,'子公司' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '工程%'
|
||||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and businessKey in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
) a
|
) a
|
||||||
GROUP BY cat
|
GROUP BY cat
|
||||||
</select>
|
</select>
|
||||||
|
@ -155,6 +199,12 @@
|
||||||
</if>
|
</if>
|
||||||
<if test="deptId !=null and deptId>0">and businessDeptId=#{deptId}</if>
|
<if test="deptId !=null and deptId>0">and businessDeptId=#{deptId}</if>
|
||||||
<if test="projectId !=null and projectId>0">and businessKey=#{projectId}</if>
|
<if test="projectId !=null and projectId>0">and businessKey=#{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and businessKey in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="listByState" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
|
<select id="listByState" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
|
||||||
SELECT * FROM vw_flow_all
|
SELECT * FROM vw_flow_all
|
||||||
|
@ -166,6 +216,12 @@
|
||||||
</if>
|
</if>
|
||||||
<if test="deptId !=null and deptId>0">and businessDeptId=#{deptId}</if>
|
<if test="deptId !=null and deptId>0">and businessDeptId=#{deptId}</if>
|
||||||
<if test="projectId !=null and projectId>0">and businessKey=#{projectId}</if>
|
<if test="projectId !=null and projectId>0">and businessKey=#{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and businessKey in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -200,4 +200,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where u.user_name = #{userName}
|
where u.user_name = #{userName}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getRootDept" parameterType="Long" resultMap="SysDeptResult">
|
||||||
|
with recursive t1 as (
|
||||||
|
select * from sys_dept where dept_id = #{deptId}
|
||||||
|
union all
|
||||||
|
select t.* from sys_dept t inner join t1 on t.dept_id = t1.parent_id
|
||||||
|
)
|
||||||
|
select * from t1 where dept_id between 111 and 116;
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -2,6 +2,8 @@ package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
import com.yanzhu.jh.work.domain.WorkFile;
|
import com.yanzhu.jh.work.domain.WorkFile;
|
||||||
import com.yanzhu.jh.work.service.IWorkFileService;
|
import com.yanzhu.jh.work.service.IWorkFileService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -19,6 +21,9 @@ public class BgWorkFileController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
IWorkFileService workFileService;
|
IWorkFileService workFileService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ISysDeptService sysDeptService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据文件归属查询文件
|
* 根据文件归属查询文件
|
||||||
* @param fileBelong
|
* @param fileBelong
|
||||||
|
@ -29,6 +34,11 @@ public class BgWorkFileController extends BaseController {
|
||||||
WorkFile workFile = new WorkFile();
|
WorkFile workFile = new WorkFile();
|
||||||
workFile.setFileBelong(fileBelong);
|
workFile.setFileBelong(fileBelong);
|
||||||
workFile.setDeptId(deptId);
|
workFile.setDeptId(deptId);
|
||||||
|
if(deptId==0){
|
||||||
|
if(SecurityUtils.isUserB()){
|
||||||
|
workFile.setDeptId(sysDeptService.getRootDept(getDeptId()));
|
||||||
|
}
|
||||||
|
}
|
||||||
return getDataTable(workFileService.selectWorkFileListLimit20(workFile));
|
return getDataTable(workFileService.selectWorkFileListLimit20(workFile));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.yanzhu.jh.work.domain.WorkTrain;
|
import com.yanzhu.jh.work.domain.WorkTrain;
|
||||||
import com.yanzhu.jh.work.service.IWorkTrainService;
|
import com.yanzhu.jh.work.service.IWorkTrainService;
|
||||||
|
@ -32,6 +33,10 @@ public class BgWorkTrainController extends BaseController {
|
||||||
workTrain.setTrainType(trainType);
|
workTrain.setTrainType(trainType);
|
||||||
if(deptId!=null && !"0".equals(deptId)){
|
if(deptId!=null && !"0".equals(deptId)){
|
||||||
workTrain.setNowDept(deptId);
|
workTrain.setNowDept(deptId);
|
||||||
|
}else{
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
workTrain.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(projectId!=null && !"0".equals(projectId)){
|
if(projectId!=null && !"0".equals(projectId)){
|
||||||
workTrain.setProjectId(Convert.toLong(projectId));
|
workTrain.setProjectId(Convert.toLong(projectId));
|
||||||
|
|
|
@ -1,23 +1,59 @@
|
||||||
package com.yanzhu.jh.bigscreen.web.controller;
|
package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.enums.SysRoleEnum;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.system.service.ISysDeptService;
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.CookieValue;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.servlet.http.Cookie;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpSession;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/bgscreen/dept")
|
@RequestMapping("/bgscreen/dept")
|
||||||
public class DeptController {
|
public class DeptController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysDeptService deptService;
|
private ISysDeptService deptService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysDeptService sysDeptService;
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public AjaxResult list(){
|
public AjaxResult list(){
|
||||||
|
long roleId=SecurityUtils.getRoleId();
|
||||||
|
if(roleId<4){
|
||||||
|
return getDeptTypeA();
|
||||||
|
}
|
||||||
|
return getDeptTypeC();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* c.子公司用户只能查看自己子公司相关的项目
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private AjaxResult getDeptTypeC() {
|
||||||
|
Long deptId= sysDeptService.getZGSDeptId(getDeptId());
|
||||||
|
SysDept dept=new SysDept();
|
||||||
|
dept.setComFlag("1");
|
||||||
|
dept.setDeptId(deptId);
|
||||||
|
List list=deptService.selectAllDeptList(dept);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 集团公司用户和集团子公司的用户可以看到所有菜单
|
||||||
|
* 1,2,3
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private AjaxResult getDeptTypeA(){
|
||||||
SysDept dept=new SysDept();
|
SysDept dept=new SysDept();
|
||||||
dept.setComFlag("1");
|
dept.setComFlag("1");
|
||||||
List list=deptService.selectAllDeptList(dept);
|
List list=deptService.selectAllDeptList(dept);
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.flowable.service.IFlowBusinessKeyService;
|
import com.ruoyi.flowable.service.IFlowBusinessKeyService;
|
||||||
import com.ruoyi.system.domain.FlowTaskEntity;
|
import com.ruoyi.system.domain.FlowTaskEntity;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -31,6 +32,11 @@ public class FloweController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
FlowTaskEntity where=new FlowTaskEntity();
|
FlowTaskEntity where=new FlowTaskEntity();
|
||||||
|
if(deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
where.setDeployId(deptId<1?null:""+deptId);
|
where.setDeployId(deptId<1?null:""+deptId);
|
||||||
where.setBusinessKey(projectId<1?null:""+projectId);
|
where.setBusinessKey(projectId<1?null:""+projectId);
|
||||||
List<FlowTaskEntity> list=flowBusinessKeyService.groupByCategory(where);
|
List<FlowTaskEntity> list=flowBusinessKeyService.groupByCategory(where);
|
||||||
|
@ -46,6 +52,11 @@ public class FloweController extends BaseController {
|
||||||
return AjaxResult.success(obj);
|
return AjaxResult.success(obj);
|
||||||
}
|
}
|
||||||
FlowTaskEntity where=new FlowTaskEntity();
|
FlowTaskEntity where=new FlowTaskEntity();
|
||||||
|
if(deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
where.setDeployId(deptId<1?"":""+deptId);
|
where.setDeployId(deptId<1?"":""+deptId);
|
||||||
where.setBusinessKey(projectId<1?"":""+projectId);
|
where.setBusinessKey(projectId<1?"":""+projectId);
|
||||||
List<FlowTaskEntity> list=flowBusinessKeyService.groupByUnit(where);
|
List<FlowTaskEntity> list=flowBusinessKeyService.groupByUnit(where);
|
||||||
|
@ -58,6 +69,11 @@ public class FloweController extends BaseController {
|
||||||
public TableDataInfo listByUnit(@RequestBody FlowTaskEntity where){
|
public TableDataInfo listByUnit(@RequestBody FlowTaskEntity where){
|
||||||
startPage();
|
startPage();
|
||||||
List<FlowTaskEntity> list=flowBusinessKeyService.listByUnit(where);
|
List<FlowTaskEntity> list=flowBusinessKeyService.listByUnit(where);
|
||||||
|
if(where.getDeptId()<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +81,11 @@ public class FloweController extends BaseController {
|
||||||
public TableDataInfo listByState(@RequestBody FlowTaskEntity where){
|
public TableDataInfo listByState(@RequestBody FlowTaskEntity where){
|
||||||
startPage();
|
startPage();
|
||||||
List<FlowTaskEntity> list=flowBusinessKeyService.listByState(where);
|
List<FlowTaskEntity> list=flowBusinessKeyService.listByState(where);
|
||||||
|
if(where.getDeptId()<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
||||||
import com.yanzhu.jh.trouble.domain.where.SmzSspProblemmodifyWhere;
|
import com.yanzhu.jh.trouble.domain.where.SmzSspProblemmodifyWhere;
|
||||||
import com.yanzhu.jh.trouble.service.ISmzSspProblemmodifyService;
|
import com.yanzhu.jh.trouble.service.ISmzSspProblemmodifyService;
|
||||||
|
@ -47,6 +48,12 @@ public class ProblemmodifyController extends BaseController {
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
return (List<SmzSspProblemmodify>) obj;
|
return (List<SmzSspProblemmodify>) obj;
|
||||||
}
|
}
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null||deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(where);
|
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return list;
|
return list;
|
||||||
|
@ -71,6 +78,12 @@ public class ProblemmodifyController extends BaseController {
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
return (List<SmzSspProblemmodify>) obj;
|
return (List<SmzSspProblemmodify>) obj;
|
||||||
}
|
}
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null||deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(where);
|
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummary(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return list;
|
return list;
|
||||||
|
@ -95,6 +108,12 @@ public class ProblemmodifyController extends BaseController {
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
return (List<SmzSspProblemmodify>) obj;
|
return (List<SmzSspProblemmodify>) obj;
|
||||||
}
|
}
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null||deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(where);
|
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return list;
|
return list;
|
||||||
|
@ -120,6 +139,12 @@ public class ProblemmodifyController extends BaseController {
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
return (List<SmzSspProblemmodify>) obj;
|
return (List<SmzSspProblemmodify>) obj;
|
||||||
}
|
}
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null||deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(where);
|
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSummaryByProject(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return list;
|
return list;
|
||||||
|
@ -128,16 +153,34 @@ public class ProblemmodifyController extends BaseController {
|
||||||
@PostMapping("/countByDate")
|
@PostMapping("/countByDate")
|
||||||
public AjaxResult countByDate(@RequestBody SmzSspProblemmodifyWhere where){
|
public AjaxResult countByDate(@RequestBody SmzSspProblemmodifyWhere where){
|
||||||
List<SmzSspProblemmodify> list=smzSspProblemmodifyService.countByDate(where);
|
List<SmzSspProblemmodify> list=smzSspProblemmodifyService.countByDate(where);
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null||deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/countByDateRange")
|
@PostMapping("/countByDateRange")
|
||||||
public AjaxResult countByDateRange(@RequestBody SmzSspProblemmodifyWhere where){
|
public AjaxResult countByDateRange(@RequestBody SmzSspProblemmodifyWhere where){
|
||||||
List<SmzSspProblemmodify> list=smzSspProblemmodifyService.countByDateRange(where);
|
List<SmzSspProblemmodify> list=smzSspProblemmodifyService.countByDateRange(where);
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null||deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
@PostMapping("/groupByInfotypeCheckState")
|
@PostMapping("/groupByInfotypeCheckState")
|
||||||
public AjaxResult groupByInfotypeCheckState(@RequestBody SmzSspProblemmodifyWhere where){
|
public AjaxResult groupByInfotypeCheckState(@RequestBody SmzSspProblemmodifyWhere where){
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null||deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SmzSspProblemmodify> list=smzSspProblemmodifyService.groupByInfotypeCheckState(where);
|
List<SmzSspProblemmodify> list=smzSspProblemmodifyService.groupByInfotypeCheckState(where);
|
||||||
SmzSspProblemmodify obj=new SmzSspProblemmodify();
|
SmzSspProblemmodify obj=new SmzSspProblemmodify();
|
||||||
obj.setId(smzSspProblemmodifyService.countTimeout(where));
|
obj.setId(smzSspProblemmodifyService.countTimeout(where));
|
||||||
|
@ -163,6 +206,11 @@ public class ProblemmodifyController extends BaseController {
|
||||||
where.setDeptId(deptId);
|
where.setDeptId(deptId);
|
||||||
where.setProjectId(projectId);
|
where.setProjectId(projectId);
|
||||||
where.setStartDate(new Date());
|
where.setStartDate(new Date());
|
||||||
|
if(deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
Map<String, List<SmzSspProblemmodify>> map=new HashMap<>();
|
Map<String, List<SmzSspProblemmodify>> map=new HashMap<>();
|
||||||
map.put("today",smzSspProblemmodifyService.countByDate(where));
|
map.put("today",smzSspProblemmodifyService.countByDate(where));
|
||||||
Date[] dts=DateUtils.getCurrentWeekDate();
|
Date[] dts=DateUtils.getCurrentWeekDate();
|
||||||
|
@ -176,6 +224,12 @@ public class ProblemmodifyController extends BaseController {
|
||||||
|
|
||||||
@PostMapping("/listSspProblemmodify")
|
@PostMapping("/listSspProblemmodify")
|
||||||
public AjaxResult listSspProblemmodify(@RequestBody SmzSspProblemmodifyWhere where){
|
public AjaxResult listSspProblemmodify(@RequestBody SmzSspProblemmodifyWhere where){
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null||deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
return AjaxResult.success(smzSspProblemmodifyService.selectSmzSspProblemmodifyListAndUnitName(where));
|
return AjaxResult.success(smzSspProblemmodifyService.selectSmzSspProblemmodifyListAndUnitName(where));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectAttendanceData;
|
import com.yanzhu.jh.project.domain.SurProjectAttendanceData;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectAttendanceUser;
|
import com.yanzhu.jh.project.domain.SurProjectAttendanceUser;
|
||||||
|
@ -17,6 +18,7 @@ import com.yanzhu.jh.project.service.ISurProjectWorkAttendanceService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -39,6 +41,8 @@ public class ProjectAttendanceController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
ISurProjectAttendanceUserService attendanceUserService;
|
ISurProjectAttendanceUserService attendanceUserService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
HttpServletRequest request;
|
||||||
/**
|
/**
|
||||||
* 查询在岗人数
|
* 查询在岗人数
|
||||||
* @param deptId
|
* @param deptId
|
||||||
|
@ -48,8 +52,13 @@ public class ProjectAttendanceController extends BaseController {
|
||||||
@GetMapping("/getDeptWorksList")
|
@GetMapping("/getDeptWorksList")
|
||||||
public TableDataInfo getDeptWorksList(String deptId,String projectId){
|
public TableDataInfo getDeptWorksList(String deptId,String projectId){
|
||||||
SurProjectDeptWroks surProjectDeptWroks = new SurProjectDeptWroks();
|
SurProjectDeptWroks surProjectDeptWroks = new SurProjectDeptWroks();
|
||||||
|
|
||||||
if(deptId!=null && !"0".equals(deptId)){
|
if(deptId!=null && !"0".equals(deptId)){
|
||||||
surProjectDeptWroks.setDeptId(Convert.toLong(deptId));
|
surProjectDeptWroks.setDeptId(Convert.toLong(deptId));
|
||||||
|
}else{
|
||||||
|
if(SecurityUtils.isUserB()){
|
||||||
|
surProjectDeptWroks.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(projectId!=null && !"0".equals(projectId)){
|
if(projectId!=null && !"0".equals(projectId)){
|
||||||
surProjectDeptWroks.setProjectId(Convert.toLong(projectId));
|
surProjectDeptWroks.setProjectId(Convert.toLong(projectId));
|
||||||
|
@ -69,6 +78,10 @@ public class ProjectAttendanceController extends BaseController {
|
||||||
SurProjectWorkAttendance surProjectWorkAttendance = new SurProjectWorkAttendance();
|
SurProjectWorkAttendance surProjectWorkAttendance = new SurProjectWorkAttendance();
|
||||||
if(deptId!=null && !"0".equals(deptId)){
|
if(deptId!=null && !"0".equals(deptId)){
|
||||||
surProjectWorkAttendance.setDeptId(Convert.toLong(deptId));
|
surProjectWorkAttendance.setDeptId(Convert.toLong(deptId));
|
||||||
|
}else{
|
||||||
|
if(SecurityUtils.isUserB()){
|
||||||
|
surProjectWorkAttendance.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(projectId!=null && !"0".equals(projectId)){
|
if(projectId!=null && !"0".equals(projectId)){
|
||||||
surProjectWorkAttendance.setProjectId(Convert.toLong(projectId));
|
surProjectWorkAttendance.setProjectId(Convert.toLong(projectId));
|
||||||
|
@ -88,6 +101,12 @@ public class ProjectAttendanceController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("/groupByComany")
|
@PostMapping("/groupByComany")
|
||||||
public AjaxResult groupByComany(@RequestBody SurProjectAttendanceData where){
|
public AjaxResult groupByComany(@RequestBody SurProjectAttendanceData where){
|
||||||
|
Long deptId= where.getDeptId();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SurProjectAttendanceData> list=attendanceDataService.groupByComany(where);
|
List<SurProjectAttendanceData> list=attendanceDataService.groupByComany(where);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
@ -97,6 +116,11 @@ public class ProjectAttendanceController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("/todayAttendance")
|
@PostMapping("/todayAttendance")
|
||||||
public TableDataInfo todayAttendance(@RequestBody SurProjectAttendanceUser where){
|
public TableDataInfo todayAttendance(@RequestBody SurProjectAttendanceUser where){
|
||||||
|
if(where.getDeptId()==null || where.getDeptId()<=0) {
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
long cnt=attendanceUserService.countTodayAttendance(where);
|
long cnt=attendanceUserService.countTodayAttendance(where);
|
||||||
List<SurProjectAttendanceUser> list=attendanceUserService.todayAttendance(where);
|
List<SurProjectAttendanceUser> list=attendanceUserService.todayAttendance(where);
|
||||||
TableDataInfo dataInfo=new TableDataInfo();
|
TableDataInfo dataInfo=new TableDataInfo();
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package com.yanzhu.jh.bigscreen.web.controller;
|
package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
|
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectBuildNodeData;
|
import com.yanzhu.jh.project.domain.SurProjectBuildNodeData;
|
||||||
import com.yanzhu.jh.project.service.ISurProjectBuildNodeDataService;
|
import com.yanzhu.jh.project.service.ISurProjectBuildNodeDataService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -14,7 +16,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/bgscreen/projectBuildNode")
|
@RequestMapping("/bgscreen/projectBuildNode")
|
||||||
|
|
||||||
public class ProjectBuildNodeController {
|
public class ProjectBuildNodeController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ISurProjectBuildNodeDataService surProjectBuildNodeDataService;
|
ISurProjectBuildNodeDataService surProjectBuildNodeDataService;
|
||||||
|
@ -27,6 +29,12 @@ public class ProjectBuildNodeController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("/selectScheduledAlerts")
|
@PostMapping("/selectScheduledAlerts")
|
||||||
public AjaxResult selectScheduledAlerts(@RequestBody SurProjectBuildNodeData where){
|
public AjaxResult selectScheduledAlerts(@RequestBody SurProjectBuildNodeData where){
|
||||||
|
Long deptId= where.getId();
|
||||||
|
if(deptId==null ||deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
return AjaxResult.success(surProjectBuildNodeDataService.selectScheduledAlerts(where));
|
return AjaxResult.success(surProjectBuildNodeDataService.selectScheduledAlerts(where));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +45,12 @@ public class ProjectBuildNodeController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("/countCompletionRate")
|
@PostMapping("/countCompletionRate")
|
||||||
public AjaxResult countCompletionRate(@RequestBody SurProjectBuildNodeData where){
|
public AjaxResult countCompletionRate(@RequestBody SurProjectBuildNodeData where){
|
||||||
|
Long deptId= where.getId();
|
||||||
|
if(deptId==null ||deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
return AjaxResult.success(surProjectBuildNodeDataService.countCompletionRate(where));
|
return AjaxResult.success(surProjectBuildNodeDataService.countCompletionRate(where));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -90,7 +104,7 @@ public class ProjectBuildNodeController {
|
||||||
String key="bgscreen_projectBuildNode_queryFinishProject_"+projectId;
|
String key="bgscreen_projectBuildNode_queryFinishProject_"+projectId;
|
||||||
Object obj=redisCache.getCacheObject(key);
|
Object obj=redisCache.getCacheObject(key);
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
//return AjaxResult.success(obj);
|
return AjaxResult.success(obj);
|
||||||
}
|
}
|
||||||
List list=surProjectBuildNodeDataService.queryFinishProject(projectId);
|
List list=surProjectBuildNodeDataService.queryFinishProject(projectId);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
|
|
|
@ -2,8 +2,10 @@ package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectCheckDetection;
|
import com.yanzhu.jh.project.domain.SurProjectCheckDetection;
|
||||||
import com.yanzhu.jh.project.service.ISurProjectCheckDetectionService;
|
import com.yanzhu.jh.project.service.ISurProjectCheckDetectionService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -17,7 +19,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/bgscreen/checkDetection")
|
@RequestMapping("/bgscreen/checkDetection")
|
||||||
public class ProjectCheckDetectionController {
|
public class ProjectCheckDetectionController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
ISurProjectCheckDetectionService checkDetectionService;
|
ISurProjectCheckDetectionService checkDetectionService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -35,6 +37,12 @@ public class ProjectCheckDetectionController {
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
return AjaxResult.success(obj);
|
return AjaxResult.success(obj);
|
||||||
}
|
}
|
||||||
|
Long deptId= where.getDeptId();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SurProjectCheckDetection> list=checkDetectionService.groupByCheckType(where);
|
List<SurProjectCheckDetection> list=checkDetectionService.groupByCheckType(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
|
@ -46,6 +54,12 @@ public class ProjectCheckDetectionController {
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
return AjaxResult.success(obj);
|
return AjaxResult.success(obj);
|
||||||
}
|
}
|
||||||
|
Long deptId= where.getDeptId();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SurProjectCheckDetection> list=checkDetectionService.getList(where);
|
List<SurProjectCheckDetection> list=checkDetectionService.getList(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
||||||
import com.yanzhu.jh.project.service.ISurProjectCheckingService;
|
import com.yanzhu.jh.project.service.ISurProjectCheckingService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -32,6 +33,10 @@ public class ProjectCheckingController extends BaseController {
|
||||||
SurProjectChecking surProjectChecking = new SurProjectChecking();
|
SurProjectChecking surProjectChecking = new SurProjectChecking();
|
||||||
if(deptId!=null && !"0".equals(deptId)){
|
if(deptId!=null && !"0".equals(deptId)){
|
||||||
surProjectChecking.setProjectDeptId(deptId);
|
surProjectChecking.setProjectDeptId(deptId);
|
||||||
|
}else{
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
surProjectChecking.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(projectId!=null && !"0".equals(projectId)){
|
if(projectId!=null && !"0".equals(projectId)){
|
||||||
surProjectChecking.setProjectId(Convert.toLong(projectId));
|
surProjectChecking.setProjectId(Convert.toLong(projectId));
|
||||||
|
@ -50,6 +55,10 @@ public class ProjectCheckingController extends BaseController {
|
||||||
SurProjectChecking surProjectChecking = new SurProjectChecking();
|
SurProjectChecking surProjectChecking = new SurProjectChecking();
|
||||||
if(deptId!=null && !"0".equals(deptId)){
|
if(deptId!=null && !"0".equals(deptId)){
|
||||||
surProjectChecking.setProjectDeptId(deptId);
|
surProjectChecking.setProjectDeptId(deptId);
|
||||||
|
}else{
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
surProjectChecking.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(projectId!=null && !"0".equals(projectId)){
|
if(projectId!=null && !"0".equals(projectId)){
|
||||||
surProjectChecking.setProjectId(Convert.toLong(projectId));
|
surProjectChecking.setProjectId(Convert.toLong(projectId));
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package com.yanzhu.jh.bigscreen.web.controller;
|
package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
|
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProject;
|
import com.yanzhu.jh.project.domain.SurProject;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectUserinfo;
|
import com.yanzhu.jh.project.domain.SurProjectUserinfo;
|
||||||
import com.yanzhu.jh.project.service.ISurProjectService;
|
import com.yanzhu.jh.project.service.ISurProjectService;
|
||||||
|
@ -18,7 +20,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/bgscreen/project")
|
@RequestMapping("/bgscreen/project")
|
||||||
public class ProjectController {
|
public class ProjectController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISurProjectService isurProjectService;
|
private ISurProjectService isurProjectService;
|
||||||
|
@ -36,6 +38,16 @@ public class ProjectController {
|
||||||
@GetMapping("findProjectByDept")
|
@GetMapping("findProjectByDept")
|
||||||
public AjaxResult findProjectByDept(Long deptId){
|
public AjaxResult findProjectByDept(Long deptId){
|
||||||
SurProject surProject=new SurProject();
|
SurProject surProject=new SurProject();
|
||||||
|
if(deptId==-1){
|
||||||
|
long roleId= SecurityUtils.getRoleId();
|
||||||
|
if(5==roleId||6==roleId||7==roleId){
|
||||||
|
surProject.setDeptId(getDeptId());
|
||||||
|
}else{
|
||||||
|
surProject.setId(SecurityUtils.getUserId());
|
||||||
|
}
|
||||||
|
return AjaxResult.success(isurProjectService.selectSurProjectListByBuser(surProject));
|
||||||
|
}
|
||||||
|
|
||||||
if(deptId!=null && deptId.longValue()>0){
|
if(deptId!=null && deptId.longValue()>0){
|
||||||
surProject.setDeptId(deptId);
|
surProject.setDeptId(deptId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectInsurance;
|
import com.yanzhu.jh.project.domain.SurProjectInsurance;
|
||||||
import com.yanzhu.jh.project.service.ISurProjectInsuranceService;
|
import com.yanzhu.jh.project.service.ISurProjectInsuranceService;
|
||||||
|
@ -39,6 +40,11 @@ public class ProjectInsuranceController extends BaseController {
|
||||||
SurProjectInsurance surProjectInsurance = new SurProjectInsurance();
|
SurProjectInsurance surProjectInsurance = new SurProjectInsurance();
|
||||||
if(deptId!=null && !"0".equals(deptId)){
|
if(deptId!=null && !"0".equals(deptId)){
|
||||||
surProjectInsurance.setNowDept(deptId);
|
surProjectInsurance.setNowDept(deptId);
|
||||||
|
}else{
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
surProjectInsurance.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(projectId!=null && !"0".equals(projectId)){
|
if(projectId!=null && !"0".equals(projectId)){
|
||||||
surProjectInsurance.setProjectId(Convert.toLong(projectId));
|
surProjectInsurance.setProjectId(Convert.toLong(projectId));
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectMaterialSeal;
|
import com.yanzhu.jh.project.domain.SurProjectMaterialSeal;
|
||||||
import com.yanzhu.jh.project.service.ISurProjectMaterialSealService;
|
import com.yanzhu.jh.project.service.ISurProjectMaterialSealService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -34,6 +35,12 @@ public class ProjectMaterialSealController extends BaseController {
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
return AjaxResult.success(obj);
|
return AjaxResult.success(obj);
|
||||||
}
|
}
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SurProjectMaterialSeal> list=materialSealService.selectTop20(where);
|
List<SurProjectMaterialSeal> list=materialSealService.selectTop20(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
|
@ -45,6 +52,12 @@ public class ProjectMaterialSealController extends BaseController {
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
return AjaxResult.success(obj);
|
return AjaxResult.success(obj);
|
||||||
}
|
}
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SurProjectMaterialSeal> list=materialSealService.groupTop12Month(where);
|
List<SurProjectMaterialSeal> list=materialSealService.groupTop12Month(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
|
@ -52,6 +65,12 @@ public class ProjectMaterialSealController extends BaseController {
|
||||||
@PostMapping("/selectTop12Month")
|
@PostMapping("/selectTop12Month")
|
||||||
public TableDataInfo selectTop12Month(@RequestBody SurProjectMaterialSeal where){
|
public TableDataInfo selectTop12Month(@RequestBody SurProjectMaterialSeal where){
|
||||||
startPage();
|
startPage();
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SurProjectMaterialSeal> list=materialSealService.selectTop12Month(where);
|
List<SurProjectMaterialSeal> list=materialSealService.selectTop12Month(where);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package com.yanzhu.jh.bigscreen.web.controller;
|
package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
|
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectMeasure;
|
import com.yanzhu.jh.project.domain.SurProjectMeasure;
|
||||||
import com.yanzhu.jh.project.service.ISurProjectMeasureService;
|
import com.yanzhu.jh.project.service.ISurProjectMeasureService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -16,7 +18,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/bgscreen/measure")
|
@RequestMapping("/bgscreen/measure")
|
||||||
public class ProjectMeasureController {
|
public class ProjectMeasureController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
ISurProjectMeasureService measureService;
|
ISurProjectMeasureService measureService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -33,6 +35,12 @@ public class ProjectMeasureController {
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
return AjaxResult.success(obj);
|
return AjaxResult.success(obj);
|
||||||
}
|
}
|
||||||
|
Long deptId= where.getDeptId();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SurProjectMeasure> list=measureService.groupMeasureInfo(where);
|
List<SurProjectMeasure> list=measureService.groupMeasureInfo(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
|
@ -44,6 +52,12 @@ public class ProjectMeasureController {
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
return AjaxResult.success(obj);
|
return AjaxResult.success(obj);
|
||||||
}
|
}
|
||||||
|
Long deptId= where.getDeptId();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SurProjectMeasure> list=measureService.getList(where);
|
List<SurProjectMeasure> list=measureService.getList(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.yanzhu.jh.project.domain.SmzProjectQuarterlyAssess;
|
import com.yanzhu.jh.project.domain.SmzProjectQuarterlyAssess;
|
||||||
import com.yanzhu.jh.project.service.ISmzProjectQuarterlyAssessService;
|
import com.yanzhu.jh.project.service.ISmzProjectQuarterlyAssessService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -54,7 +55,6 @@ public class ProjectQuarterlyAssessController extends BaseController {
|
||||||
if(obj!=null){
|
if(obj!=null){
|
||||||
return AjaxResult.success(obj);
|
return AjaxResult.success(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
List list=smzProjectQuarterlyAssessService.queryByProjectType(where);
|
List list=smzProjectQuarterlyAssessService.queryByProjectType(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectWorkSpecial;
|
import com.yanzhu.jh.project.domain.SurProjectWorkSpecial;
|
||||||
import com.yanzhu.jh.project.service.ISurProjectWorkSpecialService;
|
import com.yanzhu.jh.project.service.ISurProjectWorkSpecialService;
|
||||||
|
@ -33,6 +34,10 @@ public class ProjectSpecialController extends BaseController {
|
||||||
SurProjectWorkSpecial surProjectWorkSpecial = new SurProjectWorkSpecial();
|
SurProjectWorkSpecial surProjectWorkSpecial = new SurProjectWorkSpecial();
|
||||||
if(deptId!=null && !"0".equals(deptId)){
|
if(deptId!=null && !"0".equals(deptId)){
|
||||||
surProjectWorkSpecial.setNowDept(deptId);
|
surProjectWorkSpecial.setNowDept(deptId);
|
||||||
|
}else{
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
surProjectWorkSpecial.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(projectId!=null && !"0".equals(projectId)){
|
if(projectId!=null && !"0".equals(projectId)){
|
||||||
surProjectWorkSpecial.setProjectId(Convert.toLong(projectId));
|
surProjectWorkSpecial.setProjectId(Convert.toLong(projectId));
|
||||||
|
|
|
@ -77,5 +77,14 @@ public interface SurProjectMapper
|
||||||
public List<SurProject> selectProgressProjects(long deptId);
|
public List<SurProject> selectProgressProjects(long deptId);
|
||||||
|
|
||||||
public List<SurProject> groupByProjectCategory(long deptId);
|
public List<SurProject> groupByProjectCategory(long deptId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监理单位、总包单位、分包单位用户不展示项目概况菜单,二级菜单只展示自已参与的项目
|
||||||
|
* roleId(15,16,17,99)(select spu.project_id from sur_project_userinfo spu where spu.user_id = #{id} and spu.is_del=0) id-->userId
|
||||||
|
* roleId(5,6,7) select spui.projectId from sur_project_unit_info spui where spui.unitId = #{deptId} and spui.del_flag=0 --->deptId *
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<SurProject> selectSurProjectListByBuser(SurProject where);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,4 +66,13 @@ public interface ISurProjectService
|
||||||
public List<SurProject> groupByCategory(SurProject surProject);
|
public List<SurProject> groupByCategory(SurProject surProject);
|
||||||
|
|
||||||
public List<SurProject> groupByLevel(SurProject surProject);
|
public List<SurProject> groupByLevel(SurProject surProject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监理单位、总包单位、分包单位用户不展示项目概况菜单,二级菜单只展示自已参与的项目
|
||||||
|
* roleId(15,16,17,99)(select spu.project_id from sur_project_userinfo spu where spu.user_id = #{id} and spu.is_del=0) id-->userId
|
||||||
|
* roleId(5,6,7) select spui.projectId from sur_project_unit_info spui where spui.unitId = #{deptId} and spui.del_flag=0 --->deptId *
|
||||||
|
* @param surProject
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<SurProject> selectSurProjectListByBuser(SurProject surProject);
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,4 +115,16 @@ public class SurProjectServiceImpl implements ISurProjectService
|
||||||
public List<SurProject> groupByLevel(SurProject surProject) {
|
public List<SurProject> groupByLevel(SurProject surProject) {
|
||||||
return surProjectMapper.groupByLevel(surProject);
|
return surProjectMapper.groupByLevel(surProject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监理单位、总包单位、分包单位用户不展示项目概况菜单,二级菜单只展示自已参与的项目
|
||||||
|
* roleId(15,16,17,99)(select spu.project_id from sur_project_userinfo spu where spu.user_id = #{id} and spu.is_del=0) id-->userId
|
||||||
|
* roleId(5,6,7) select spui.projectId from sur_project_unit_info spui where spui.unitId = #{deptId} and spui.del_flag=0 --->deptId *
|
||||||
|
* @param surProject
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SurProject> selectSurProjectListByBuser(SurProject where) {
|
||||||
|
return surProjectMapper.selectSurProjectListByBuser(where);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,6 +178,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SELECT id FROM sur_project WHERE isdel=0 AND deptid = #{subDeptId}
|
SELECT id FROM sur_project WHERE isdel=0 AND deptid = #{subDeptId}
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="projectId!=null and projectId>0"> and project_id=#{projectId}</if>
|
<if test="projectId!=null and projectId>0"> and project_id=#{projectId}</if>
|
||||||
group by workerId )
|
group by workerId )
|
||||||
and companyTypeId in (1,2,3,8) group by companyTypeId
|
and companyTypeId in (1,2,3,8) group by companyTypeId
|
||||||
|
|
|
@ -297,6 +297,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId!=null and deptId>0">
|
<if test="deptId!=null and deptId>0">
|
||||||
and c.project_id in (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
and c.project_id in (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and c.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="todayAttendance" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
<select id="todayAttendance" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||||
select a.* ,
|
select a.* ,
|
||||||
|
@ -320,6 +326,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId!=null and deptId>0">
|
<if test="deptId!=null and deptId>0">
|
||||||
and c.project_id in (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
and c.project_id in (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and c.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
order by u.id limit #{index},#{size} ) a
|
order by u.id limit #{index},#{size} ) a
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -149,6 +149,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE LENGTH(node_lvl)=2
|
WHERE LENGTH(node_lvl)=2
|
||||||
<if test="projectId !=null and projectId !=0">and project_id=#{projectId}</if>
|
<if test="projectId !=null and projectId !=0">and project_id=#{projectId}</if>
|
||||||
<if test="id!=null and id!=0">and project_id in (SELECT id FROM sur_project WHERE deptid=#{id})</if>
|
<if test="id!=null and id!=0">and project_id in (SELECT id FROM sur_project WHERE deptid=#{id})</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY project_id) order by projectSort
|
GROUP BY project_id) order by projectSort
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -168,6 +174,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE LENGTH(node_lvl)=2
|
WHERE LENGTH(node_lvl)=2
|
||||||
<if test="projectId !=null and projectId !=0">and project_id=#{projectId}</if>
|
<if test="projectId !=null and projectId !=0">and project_id=#{projectId}</if>
|
||||||
<if test="id!=null and id!=0">and project_id in (SELECT id FROM sur_project WHERE deptid=#{id})</if>
|
<if test="id!=null and id!=0">and project_id in (SELECT id FROM sur_project WHERE deptid=#{id})</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY project_id)) a LEFT JOIN (
|
GROUP BY project_id)) a LEFT JOIN (
|
||||||
|
|
||||||
|
|
||||||
|
@ -178,6 +190,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE LENGTH(node_lvl)=2
|
WHERE LENGTH(node_lvl)=2
|
||||||
<if test="projectId !=null and projectId !=0">and project_id=#{projectId}</if>
|
<if test="projectId !=null and projectId !=0">and project_id=#{projectId}</if>
|
||||||
<if test="id!=null and id!=0">and project_id in (SELECT id FROM sur_project WHERE deptid=#{id})</if>
|
<if test="id!=null and id!=0">and project_id in (SELECT id FROM sur_project WHERE deptid=#{id})</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY project_id)) b WHERE a.project_id=b.project_id AND LEFT(a.node_lvl,2)=b.node_lvl AND LENGTH(a.node_lvl)>2
|
GROUP BY project_id)) b WHERE a.project_id=b.project_id AND LEFT(a.node_lvl,2)=b.node_lvl AND LENGTH(a.node_lvl)>2
|
||||||
GROUP BY a.project_id) b ON a.project_id =b.project_id
|
GROUP BY a.project_id) b ON a.project_id =b.project_id
|
||||||
|
|
||||||
|
@ -188,6 +206,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE LENGTH(node_lvl)=2
|
WHERE LENGTH(node_lvl)=2
|
||||||
<if test="projectId !=null and projectId !=0">and project_id=#{projectId}</if>
|
<if test="projectId !=null and projectId !=0">and project_id=#{projectId}</if>
|
||||||
<if test="id!=null and id!=0">and project_id in (SELECT id FROM sur_project WHERE deptid=#{id})</if>
|
<if test="id!=null and id!=0">and project_id in (SELECT id FROM sur_project WHERE deptid=#{id})</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY project_id)) b WHERE a.project_id=b.project_id AND LEFT(a.node_lvl,2)=b.node_lvl AND LENGTH(a.node_lvl)>2 AND a.end_date IS NOT NULL
|
GROUP BY project_id)) b WHERE a.project_id=b.project_id AND LEFT(a.node_lvl,2)=b.node_lvl AND LENGTH(a.node_lvl)>2 AND a.end_date IS NOT NULL
|
||||||
GROUP BY a.project_id
|
GROUP BY a.project_id
|
||||||
) c ON a.project_id=c.project_id
|
) c ON a.project_id=c.project_id
|
||||||
|
|
|
@ -239,6 +239,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId !=null and deptId > 0 ">
|
<if test="deptId !=null and deptId > 0 ">
|
||||||
and project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
and project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="projectId !=null and projectId > 0 ">
|
<if test="projectId !=null and projectId > 0 ">
|
||||||
and project_id=#{projectId}
|
and project_id=#{projectId}
|
||||||
</if>
|
</if>
|
||||||
|
@ -254,6 +260,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId !=null and deptId > 0 ">
|
<if test="deptId !=null and deptId > 0 ">
|
||||||
and project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
and project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="projectId !=null and projectId > 0 ">
|
<if test="projectId !=null and projectId > 0 ">
|
||||||
and project_id=#{projectId}
|
and project_id=#{projectId}
|
||||||
</if>
|
</if>
|
||||||
|
@ -269,6 +281,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId !=null and deptId > 0 ">
|
<if test="deptId !=null and deptId > 0 ">
|
||||||
and project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
and project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="projectId !=null and projectId > 0 ">
|
<if test="projectId !=null and projectId > 0 ">
|
||||||
and project_id=#{projectId}
|
and project_id=#{projectId}
|
||||||
</if>
|
</if>
|
||||||
|
@ -282,6 +300,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId !=null and deptId > 0 ">
|
<if test="deptId !=null and deptId > 0 ">
|
||||||
and spcd.project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
and spcd.project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and spcd.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="projectId !=null and projectId > 0 ">
|
<if test="projectId !=null and projectId > 0 ">
|
||||||
and spcd.project_id=#{projectId}
|
and spcd.project_id=#{projectId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -95,6 +95,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<where>
|
<where>
|
||||||
and spc.is_del=0
|
and spc.is_del=0
|
||||||
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and spc.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
||||||
<if test="deptId != null "> and spc.dept_id = #{deptId}</if>
|
<if test="deptId != null "> and spc.dept_id = #{deptId}</if>
|
||||||
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
|
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
|
||||||
|
@ -131,6 +137,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and spc.is_del=0
|
and spc.is_del=0
|
||||||
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
||||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and spc.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
group by check_result
|
group by check_result
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -85,8 +85,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sur_project sp on spdw.project_id=sp.id
|
left join sur_project sp on spdw.project_id=sp.id
|
||||||
<where>
|
<where>
|
||||||
and spdw.is_del=0
|
and spdw.is_del=0
|
||||||
<if test="projectId != null "> and spdw.project_id = #{projectId}</if>
|
<if test="projectId != null and projectId>0"> and spdw.project_id = #{projectId}</if>
|
||||||
<if test="deptId != null "> and sp.deptId = #{deptId}</if>
|
<if test="deptId != null and deptId>0"> and sp.deptId = #{deptId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and spdw.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
<if test="projectId != null "> group by spdw.project_id</if>
|
<if test="projectId != null "> group by spdw.project_id</if>
|
||||||
<if test="deptId != null and projectId == null"> group by sp.deptId</if>
|
<if test="deptId != null and projectId == null"> group by sp.deptId</if>
|
||||||
|
|
|
@ -181,6 +181,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where sp.isDel=0
|
where sp.isDel=0
|
||||||
<if test="nowDept != null and nowDept != ''"> and sp.deptId = #{nowDept}</if>
|
<if test="nowDept != null and nowDept != ''"> and sp.deptId = #{nowDept}</if>
|
||||||
<if test="projectId != null "> and sp.id = #{projectId}</if>
|
<if test="projectId != null "> and sp.id = #{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and sp.id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY sp.id,sp.projectName
|
GROUP BY sp.id,sp.projectName
|
||||||
ORDER BY sp.projectSort ASC
|
ORDER BY sp.projectSort ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -344,4 +344,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ON p.projectType=d.dict_value
|
ON p.projectType=d.dict_value
|
||||||
GROUP BY d.dict_value,d.dict_label,p.projectSchedule
|
GROUP BY d.dict_value,d.dict_label,p.projectSchedule
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSurProjectListByBuser" parameterType="SurProject" resultMap="SurProjectResult">
|
||||||
|
select sp.id, sp.deptId, sp.projectName, sp.projectCode, sp.paretProjectName, sp.paretProjectCode, sp.simpleName, sp.projectType, sp.projiectLevel, sp.projectRegional, a.areaName as projectRegionalName, sp.projectAddress, sp.projectNature, sp.licenceNumber, sp.projectApproval, sp.projectPerson, sp.projectPhone, sp.longitude, sp.latitude, sp.projectTimeLimit, sp.totalInvestment, sp.floorArea, sp.totalOutputValue, sp.plannedCompletionTime, sp.scheduledStartTime, sp.actualOperatingTime, sp.actualCompletionTime, sp.contractAmount, sp.paidAmount, sp.onAccountAmount, sp.projectSchedule, sp.projectSummarize, sp.isDel, sp.projectStatus, sp.servicePersonnel, sp.supervisorPersonnel, sp.generalContractor, sp.create_by, sp.create_time, sp.update_by, sp.update_time, sp.remark, sp.weightType, sp.projectSort, sp.progressVisible, d.dept_name
|
||||||
|
from (
|
||||||
|
select * from sur_project sp where sp.isdel=0
|
||||||
|
<if test="id!=null and id>0">
|
||||||
|
and sp.id in (select spu.project_id from sur_project_userinfo spu where spu.user_id = #{id} and spu.is_del=0)
|
||||||
|
</if>
|
||||||
|
<if test="deptId!=null and deptId>0">
|
||||||
|
and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{deptId} and spui.del_flag=0)
|
||||||
|
</if>
|
||||||
|
) as sp
|
||||||
|
left join sys_dept d on d.dept_id = sp.deptId
|
||||||
|
left join china_area a on sp.projectRegional = a.id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -192,6 +192,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where spme.is_del=0
|
where spme.is_del=0
|
||||||
<if test="deptId != null and deptId > 0"> and sp.deptId = #{deptId} </if>
|
<if test="deptId != null and deptId > 0"> and sp.deptId = #{deptId} </if>
|
||||||
<if test="projectId != null and projectId > 0">and sp.id = #{projectId}</if>
|
<if test="projectId != null and projectId > 0">and sp.id = #{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and sp.id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
) spme
|
) spme
|
||||||
order by spme.create_time desc
|
order by spme.create_time desc
|
||||||
LIMIT 0,20
|
LIMIT 0,20
|
||||||
|
@ -201,6 +207,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
from sur_project_material_seal where is_del=0
|
from sur_project_material_seal where is_del=0
|
||||||
<if test="deptId != null and deptId > 0"> and project_id in ( SELECT id FROM sur_project WHERE deptid= #{deptId}) </if>
|
<if test="deptId != null and deptId > 0"> and project_id in ( SELECT id FROM sur_project WHERE deptid= #{deptId}) </if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="projectId != null and projectId > 0">and project_id = #{projectId}</if>
|
<if test="projectId != null and projectId > 0">and project_id = #{projectId}</if>
|
||||||
and seal_date>=DATE_SUB(CURDATE(),interval 12 month)
|
and seal_date>=DATE_SUB(CURDATE(),interval 12 month)
|
||||||
group by year(seal_date),month(seal_date)
|
group by year(seal_date),month(seal_date)
|
||||||
|
@ -216,6 +228,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and spme.seal_date>=DATE_SUB(CURDATE(),interval 12 month)
|
and spme.seal_date>=DATE_SUB(CURDATE(),interval 12 month)
|
||||||
<if test="deptId != null and deptId > 0"> and sp.deptId = #{deptId} </if>
|
<if test="deptId != null and deptId > 0"> and sp.deptId = #{deptId} </if>
|
||||||
<if test="projectId != null and projectId > 0">and sp.id = #{projectId}</if>
|
<if test="projectId != null and projectId > 0">and sp.id = #{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and sp.id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
order by spme.seal_date desc
|
order by spme.seal_date desc
|
||||||
) spme
|
) spme
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -197,6 +197,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId !=null and deptId >0">
|
<if test="deptId !=null and deptId >0">
|
||||||
AND project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
AND project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="projectId !=null and projectId >0">
|
<if test="projectId !=null and projectId >0">
|
||||||
AND project_id=#{projectId}
|
AND project_id=#{projectId}
|
||||||
</if>
|
</if>
|
||||||
|
@ -221,6 +227,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId !=null and deptId >0">
|
<if test="deptId !=null and deptId >0">
|
||||||
AND spm.project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
AND spm.project_id IN (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and spm.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="projectId !=null and projectId >0">
|
<if test="projectId !=null and projectId >0">
|
||||||
AND spm.project_id=#{projectId}
|
AND spm.project_id=#{projectId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -161,7 +161,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
s1.is_del = 0
|
s1.is_del = 0
|
||||||
<if test="nowDept != null and nowDept != ''"> and sp1.deptId = #{nowDept}</if>
|
<if test="nowDept != null and nowDept != ''"> and sp1.deptId = #{nowDept}</if>
|
||||||
<if test="projectId != null "> and s1.project_id = #{projectId}</if>
|
<if test="projectId != null "> and s1.project_id = #{projectId}</if>
|
||||||
AND s1.credential_expiration_time > NOW()
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and s1.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
AND s1.credential_expiration_time > NOW()
|
||||||
AND DATE_SUB(
|
AND DATE_SUB(
|
||||||
s1.credential_expiration_time,
|
s1.credential_expiration_time,
|
||||||
INTERVAL 1 MONTH
|
INTERVAL 1 MONTH
|
||||||
|
@ -180,6 +187,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
s2.is_del = 0
|
s2.is_del = 0
|
||||||
<if test="nowDept != null and nowDept != ''"> and sp2.deptId = #{nowDept}</if>
|
<if test="nowDept != null and nowDept != ''"> and sp2.deptId = #{nowDept}</if>
|
||||||
<if test="projectId != null "> and s2.project_id = #{projectId}</if>
|
<if test="projectId != null "> and s2.project_id = #{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and s2.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
AND s2.credential_expiration_time <![CDATA[ < ]]> NOW()
|
AND s2.credential_expiration_time <![CDATA[ < ]]> NOW()
|
||||||
GROUP BY
|
GROUP BY
|
||||||
s2.project_id
|
s2.project_id
|
||||||
|
@ -188,6 +201,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
spws.is_del = 0
|
spws.is_del = 0
|
||||||
<if test="nowDept != null and nowDept != ''"> and sp.deptId = #{nowDept}</if>
|
<if test="nowDept != null and nowDept != ''"> and sp.deptId = #{nowDept}</if>
|
||||||
<if test="projectId != null "> and spws.project_id = #{projectId}</if>
|
<if test="projectId != null "> and spws.project_id = #{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and spws.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
spws.project_id
|
spws.project_id
|
||||||
ORDER BY
|
ORDER BY
|
||||||
|
|
|
@ -426,7 +426,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where isDel=0
|
where isDel=0
|
||||||
<if test="projectId>0">and projectId=#{projectId}</if>
|
<if test="projectId>0">and projectId=#{projectId}</if>
|
||||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
) AND infotype=#{infoType} and isDel=0
|
) AND infotype=#{infoType} and isDel=0
|
||||||
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
||||||
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
||||||
|
@ -444,6 +449,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where infoType=#{infoType} AND isDel=0
|
where infoType=#{infoType} AND isDel=0
|
||||||
<if test="projectId>0">and projectId=#{projectId}</if>
|
<if test="projectId>0">and projectId=#{projectId}</if>
|
||||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
||||||
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
||||||
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
||||||
|
@ -456,6 +467,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and infoType=#{infoType} AND isDel=0
|
and infoType=#{infoType} AND isDel=0
|
||||||
<if test="projectId>0">and projectId=#{projectId}</if>
|
<if test="projectId>0">and projectId=#{projectId}</if>
|
||||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
||||||
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
||||||
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
||||||
|
@ -468,6 +485,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and infoType=#{infoType} AND isDel=0
|
and infoType=#{infoType} AND isDel=0
|
||||||
<if test="projectId>0">and projectId=#{projectId}</if>
|
<if test="projectId>0">and projectId=#{projectId}</if>
|
||||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
||||||
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
||||||
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
||||||
|
@ -481,6 +504,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and infoType=#{infoType} AND isDel=0
|
and infoType=#{infoType} AND isDel=0
|
||||||
<if test="projectId>0">and projectId=#{projectId}</if>
|
<if test="projectId>0">and projectId=#{projectId}</if>
|
||||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
||||||
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
||||||
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
||||||
|
@ -500,6 +529,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
and DATE(createTime)=Date(#{startDate})
|
and DATE(createTime)=Date(#{startDate})
|
||||||
GROUP BY infotype
|
GROUP BY infotype
|
||||||
|
|
||||||
|
@ -514,6 +549,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId >0 ">AND deptid = #{id}</if>
|
<if test="deptId >0 ">AND deptid = #{id}</if>
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
and DATE(createTime)>=Date(#{startDate}) and Date(createTime)<=Date(#{endDate})
|
and DATE(createTime)>=Date(#{startDate}) and Date(createTime)<=Date(#{endDate})
|
||||||
]]>
|
]]>
|
||||||
|
@ -533,6 +574,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY infotype,checkState
|
GROUP BY infotype,checkState
|
||||||
</select>
|
</select>
|
||||||
<select id="countTimeout" parameterType="SmzSspProblemmodifyWhere" resultType="Integer">
|
<select id="countTimeout" parameterType="SmzSspProblemmodifyWhere" resultType="Integer">
|
||||||
|
@ -550,6 +597,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
@ -571,6 +624,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<where>
|
<where>
|
||||||
and ssp.isDel=0
|
and ssp.isDel=0
|
||||||
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and ssp.projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
|
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
|
||||||
<if test="roleType != null and roleType >0 "> and ssp.roleType = #{roleType}</if>
|
<if test="roleType != null and roleType >0 "> and ssp.roleType = #{roleType}</if>
|
||||||
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
|
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
|
||||||
|
|
|
@ -109,6 +109,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="nowDept != null and nowDept != ''"> and sp.deptId = #{nowDept}</if>
|
<if test="nowDept != null and nowDept != ''"> and sp.deptId = #{nowDept}</if>
|
||||||
<if test="trainType != null and trainType != ''"> and wt.train_type = #{trainType}</if>
|
<if test="trainType != null and trainType != ''"> and wt.train_type = #{trainType}</if>
|
||||||
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
|
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and wt.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
group by wt.id
|
group by wt.id
|
||||||
order by wt.create_time desc
|
order by wt.create_time desc
|
||||||
|
|
Loading…
Reference in New Issue