工作流 复审 标准类别搜索 企业标准 复审
This commit is contained in:
+9
@@ -11,6 +11,7 @@ import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -77,5 +78,13 @@ public class SarBussionessStandStatePage extends BasePage {
|
||||
@ApiModelProperty(value = "标准类别")
|
||||
private String menuId;
|
||||
|
||||
private List<String> menuAllChildrenIdList;
|
||||
|
||||
private String userId;
|
||||
|
||||
private String treeType;
|
||||
|
||||
private List<String> menuRoleList;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+109
@@ -5,7 +5,14 @@ import com.adc.da.slrs.sarBussionessStandState.entity.SarBussionessStandState;
|
||||
import com.adc.da.slrs.sarBussionessStandState.dao.SarBussionessStandStateDao;
|
||||
import com.adc.da.slrs.sarBussionessStandState.entity.SarBussionessStandStatePage;
|
||||
import com.adc.da.slrs.sarBussionessStandState.service.ISarBussionessStandStateService;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.sys.sarMenuStandard.service.ISarMenuStandardService;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@@ -21,6 +28,15 @@ import java.util.List;
|
||||
@Service
|
||||
public class SarBussionessStandStateServiceImpl extends ServiceImpl<SarBussionessStandStateDao, SarBussionessStandState> implements ISarBussionessStandStateService {
|
||||
|
||||
@Autowired
|
||||
private ISarMenuStandardService iSarMenuStandardService;
|
||||
|
||||
@Autowired
|
||||
private ITsResourceService iTsResourceService;
|
||||
|
||||
@Autowired
|
||||
private ITsUserService tsUserService;
|
||||
|
||||
@Override
|
||||
public List<ModelData> getSarBussionessStandStateProcessList(SarBussionessStandStatePage page){
|
||||
List<ModelData> stateList = this.baseMapper.getSarBussionessStandStateProcessList(page);
|
||||
@@ -29,6 +45,54 @@ public class SarBussionessStandStateServiceImpl extends ServiceImpl<SarBussiones
|
||||
|
||||
@Override
|
||||
public List<SarBussionessStandState> getSarBussionessStandStatePageNo(SarBussionessStandStatePage page) throws Exception{
|
||||
if(page.getMenuId()!=null && StringUtils.isNotBlank(page.getMenuId())){
|
||||
|
||||
}
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
String treeType = page.getTreeType();
|
||||
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||
qw.eq("ID",page.getMenuId());
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "tsr".equals(treeType)){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}else if(!page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iSarMenuStandardService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
|
||||
// if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
// List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
// if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
// page.setMenuRoleList(getMenuIdList);
|
||||
// } else {
|
||||
// page.setMenuRoleList(null);
|
||||
// }
|
||||
// List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
// if (ids != null && !ids.isEmpty()) {
|
||||
// page.setMenuAllChildrenIdList(ids);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
Integer rowCount = this.baseMapper.getBussionessStandStateCountNo(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarBussionessStandState> stateList = this.baseMapper.getSarBussionessStandStatePageNo(page);
|
||||
@@ -37,6 +101,51 @@ public class SarBussionessStandStateServiceImpl extends ServiceImpl<SarBussiones
|
||||
|
||||
@Override
|
||||
public List<SarBussionessStandState> getSarBussionessStandStatePage(SarBussionessStandStatePage page) throws Exception{
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
String treeType = page.getTreeType();
|
||||
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||
qw.eq("ID",page.getMenuId());
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "tsr".equals(treeType)){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}else if(!page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iSarMenuStandardService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
|
||||
// if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
// List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
// if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
// page.setMenuRoleList(getMenuIdList);
|
||||
// } else {
|
||||
// page.setMenuRoleList(null);
|
||||
// }
|
||||
// List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
// if (ids != null && !ids.isEmpty()) {
|
||||
// page.setMenuAllChildrenIdList(ids);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
Integer rowCount = this.baseMapper.getBussionessStandStateCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarBussionessStandState> stateList = this.baseMapper.getBussionessStandStatePage(page);
|
||||
|
||||
+7
-7
@@ -568,14 +568,14 @@
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 游离态标准查询 -->
|
||||
<!-- <if test="menuId != null and menuId =='nomenu'" >-->
|
||||
<!-- and SAR_BUSS_STAND_MENU.MENU_ID = (select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null and sor_divide ='BUSINESS_STAND' and valid_flag=0)-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="menuId != null and menuId =='nomenu'" >-->
|
||||
<!-- and SAR_BUSS_STAND_MENU.MENU_ID = (select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null and sor_divide ='BUSINESS_STAND' and valid_flag=0)-->
|
||||
<!-- </if>-->
|
||||
<!-- 当第一次进入页面未选择记录时-->
|
||||
<!-- <if test="(menuId == null or menuId =='') and menuRoleList == null" >-->
|
||||
<!-- and SAR_BUSS_STAND_MENU.MENU_ID in ( SELECT TS_RESOURCE.id FROM TS_RESOURCE START WITH id =(-->
|
||||
<!-- SELECT TS_RESOURCE.id FROM TS_RESOURCE WHERE parent_id IS NULL AND sor_divide = 'BUSINESS_STAND' and valid_flag=0 ) CONNECT BY PRIOR id = parent_id )-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="(menuId == null or menuId =='') and menuRoleList == null" >-->
|
||||
<!-- and SAR_BUSS_STAND_MENU.MENU_ID in ( SELECT TS_RESOURCE.id FROM TS_RESOURCE START WITH id =(-->
|
||||
<!-- SELECT TS_RESOURCE.id FROM TS_RESOURCE WHERE parent_id IS NULL AND sor_divide = 'BUSINESS_STAND' and valid_flag=0 ) CONNECT BY PRIOR id = parent_id )-->
|
||||
<!-- </if>-->
|
||||
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in
|
||||
|
||||
+113
-3
@@ -21,7 +21,9 @@
|
||||
sar_bussioness_stand_state.MODIFY_TIME,
|
||||
sar_bussioness_stand_state.VALID_FLAG,
|
||||
sar_bussioness_stand_state.PARAM1,
|
||||
sar_bussioness_stand_state.PARAM2
|
||||
sar_bussioness_stand_state.PARAM2,
|
||||
sar_buss_stand_attr_info.QCDW As 'QCDW',
|
||||
sar_buss_stand_attr_info.QCRBUSS AS 'QCRBUSS'
|
||||
</sql>
|
||||
<sql id="Base_Column_List_buss" >
|
||||
DISTINCT sar_bussioness_stand.ID,
|
||||
@@ -117,6 +119,35 @@
|
||||
<if test="QCDW != null and QCDW != '' " >
|
||||
and QCDW like concat(concat('%',#{QCDW}),'%')
|
||||
</if>
|
||||
|
||||
|
||||
<if test="menuId != null and menuId =='nomenu' and menuAllChildrenIdList != null and menuAllChildrenIdList.size()>0 and sarMsType != null and sarMsType == 'filterSarMsMenu'" >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID IS NULL
|
||||
</if>
|
||||
|
||||
<!-- 目录判断 -->
|
||||
<if test="menuId != null and menuId !='nomenu' and menuAllChildrenIdList != null and menuAllChildrenIdList.size()>0 " >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 游离态标准查询 -->
|
||||
<!-- <if test="menuId != null and menuId =='nomenu'" >-->
|
||||
<!-- and SAR_BUSS_STAND_MENU.MENU_ID = (select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null and sor_divide ='BUSINESS_STAND' and valid_flag=0)-->
|
||||
<!-- </if>-->
|
||||
<!-- 当第一次进入页面未选择记录时-->
|
||||
<!-- <if test="(menuId == null or menuId =='') and menuRoleList == null" >-->
|
||||
<!-- and SAR_BUSS_STAND_MENU.MENU_ID in ( SELECT TS_RESOURCE.id FROM TS_RESOURCE START WITH id =(-->
|
||||
<!-- SELECT TS_RESOURCE.id FROM TS_RESOURCE WHERE parent_id IS NULL AND sor_divide = 'BUSINESS_STAND' and valid_flag=0 ) CONNECT BY PRIOR id = parent_id )-->
|
||||
<!-- </if>-->
|
||||
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
<sql id="SarBussionInfoRole_Where_Clause_Review_Results_N">
|
||||
@@ -144,6 +175,38 @@
|
||||
<if test="issueTimeStart == null and issueTimeStart == '' and issueTimeEnd != null and issueTimeEnd != ''">
|
||||
and DATE_FORMAT(ISSUE_TIME,'%Y-%m-%d') <= DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="QCDW != null and QCDW != '' " >
|
||||
and QCDW like concat(concat('%',#{QCDW}),'%')
|
||||
</if>
|
||||
|
||||
|
||||
<if test="menuId != null and menuId =='nomenu' and menuAllChildrenIdList != null and menuAllChildrenIdList.size()>0 and sarMsType != null and sarMsType == 'filterSarMsMenu'" >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID IS NULL
|
||||
</if>
|
||||
|
||||
<!-- 目录判断 -->
|
||||
<if test="menuId != null and menuId !='nomenu' and menuAllChildrenIdList != null and menuAllChildrenIdList.size()>0 " >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 游离态标准查询 -->
|
||||
<!-- <if test="menuId != null and menuId =='nomenu'" >-->
|
||||
<!-- and SAR_BUSS_STAND_MENU.MENU_ID = (select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null and sor_divide ='BUSINESS_STAND' and valid_flag=0)-->
|
||||
<!-- </if>-->
|
||||
<!-- 当第一次进入页面未选择记录时-->
|
||||
<!-- <if test="(menuId == null or menuId =='') and menuRoleList == null" >-->
|
||||
<!-- and SAR_BUSS_STAND_MENU.MENU_ID in ( SELECT TS_RESOURCE.id FROM TS_RESOURCE START WITH id =(-->
|
||||
<!-- SELECT TS_RESOURCE.id FROM TS_RESOURCE WHERE parent_id IS NULL AND sor_divide = 'BUSINESS_STAND' and valid_flag=0 ) CONNECT BY PRIOR id = parent_id )-->
|
||||
<!-- </if>-->
|
||||
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
<sql id="SarBussionInfoRole_Where_Clause_Review_Results">
|
||||
@@ -170,6 +233,38 @@
|
||||
<if test="issueTimeStart == null and issueTimeStart == '' and issueTimeEnd != null and issueTimeEnd != ''">
|
||||
and DATE_FORMAT(ISSUE_TIME,'%Y-%m-%d') <= DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="QCDW != null and QCDW != '' " >
|
||||
and QCDW like concat(concat('%',#{QCDW}),'%')
|
||||
</if>
|
||||
|
||||
|
||||
<if test="menuId != null and menuId =='nomenu' and menuAllChildrenIdList != null and menuAllChildrenIdList.size()>0 and sarMsType != null and sarMsType == 'filterSarMsMenu'" >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID IS NULL
|
||||
</if>
|
||||
|
||||
<!-- 目录判断 -->
|
||||
<if test="menuId != null and menuId !='nomenu' and menuAllChildrenIdList != null and menuAllChildrenIdList.size()>0 " >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 游离态标准查询 -->
|
||||
<!-- <if test="menuId != null and menuId =='nomenu'" >-->
|
||||
<!-- and SAR_BUSS_STAND_MENU.MENU_ID = (select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null and sor_divide ='BUSINESS_STAND' and valid_flag=0)-->
|
||||
<!-- </if>-->
|
||||
<!-- 当第一次进入页面未选择记录时-->
|
||||
<!-- <if test="(menuId == null or menuId =='') and menuRoleList == null" >-->
|
||||
<!-- and SAR_BUSS_STAND_MENU.MENU_ID in ( SELECT TS_RESOURCE.id FROM TS_RESOURCE START WITH id =(-->
|
||||
<!-- SELECT TS_RESOURCE.id FROM TS_RESOURCE WHERE parent_id IS NULL AND sor_divide = 'BUSINESS_STAND' and valid_flag=0 ) CONNECT BY PRIOR id = parent_id )-->
|
||||
<!-- </if>-->
|
||||
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
@@ -254,6 +349,7 @@
|
||||
sar_buss_stand_attr_info.QCRBUSS
|
||||
from sar_bussioness_stand
|
||||
LEFT JOIN sar_buss_stand_attr_info ON sar_buss_stand_attr_info.stand_id = sar_bussioness_stand.id
|
||||
left join SAR_BUSS_STAND_MENU ON SAR_BUSSIONESS_STAND.id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
<include refid="SarBussionInfoRole_Where_Clause_Review_Results_Buss"/>
|
||||
) A
|
||||
ORDER BY
|
||||
@@ -276,10 +372,14 @@
|
||||
SELECT A.* FROM (
|
||||
select <include refid="Base_Column_List" />
|
||||
from sar_bussioness_stand_state
|
||||
LEFT JOIN sar_buss_stand_attr_info ON sar_buss_stand_attr_info.stand_id = sar_bussioness_stand_state.stand_id
|
||||
LEFT JOIN SAR_BUSS_STAND_MENU ON sar_bussioness_stand_state.stand_id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
<include refid="SarBussionInfoRole_Where_Clause_Review_Results_N"/>
|
||||
union
|
||||
select <include refid="Base_Column_List" />
|
||||
from sar_bussioness_stand_state
|
||||
LEFT JOIN sar_buss_stand_attr_info ON sar_buss_stand_attr_info.stand_id = sar_bussioness_stand_state.stand_id
|
||||
LEFT JOIN SAR_BUSS_STAND_MENU ON sar_bussioness_stand_state.stand_id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
<include refid="SarBussionInfoRole_Where_Clause_Review_Results"/>
|
||||
ORDER BY
|
||||
REVIEW_RESULTS ASC,
|
||||
@@ -291,10 +391,20 @@
|
||||
|
||||
<select id="getBussionessStandStateCount" resultType="java.lang.Integer" parameterType="com.adc.da.slrs.sarBussionessStandState.entity.SarBussionessStandStatePage">
|
||||
select count(1) from (
|
||||
select id from sar_bussioness_stand_state
|
||||
SELECT
|
||||
sar_bussioness_stand_state.id
|
||||
FROM
|
||||
sar_bussioness_stand_state
|
||||
LEFT JOIN sar_buss_stand_attr_info ON sar_buss_stand_attr_info.stand_id = sar_bussioness_stand_state.stand_id
|
||||
LEFT JOIN SAR_BUSS_STAND_MENU ON sar_bussioness_stand_state.stand_id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
<include refid="SarBussionInfoRole_Where_Clause_Review_Results_N"/>
|
||||
union
|
||||
select id from sar_bussioness_stand_state
|
||||
SELECT
|
||||
sar_bussioness_stand_state.id
|
||||
FROM
|
||||
sar_bussioness_stand_state
|
||||
LEFT JOIN sar_buss_stand_attr_info ON sar_buss_stand_attr_info.stand_id = sar_bussioness_stand_state.stand_id
|
||||
LEFT JOIN SAR_BUSS_STAND_MENU ON sar_bussioness_stand_state.stand_id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
<include refid="SarBussionInfoRole_Where_Clause_Review_Results"/>
|
||||
) a
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user