|
@@ -283,9 +283,18 @@ public class EVisaTaskCheckController {
|
|
|
|
|
|
//首先找到对应流程下的审批人组
|
|
|
List<FixedFlowLink> flowLink = this.fixedFlowLinkService.selectFixedFlowLink(next.getId().toString());
|
|
|
+ List<Long> ids = flowLink.stream().map(l -> l.getFixedFlowLinkUser()).collect(Collectors.toList());
|
|
|
|
|
|
//获取这些人资料合同段下的权限
|
|
|
List<JSONObject> userRoleList = this.saveUserInfoByProjectClient.queryUserContractRole(flowLink.stream().map(FixedFlowLink::getFixedFlowLinkUser).distinct().collect(Collectors.toList()), node.getContractId()+"");
|
|
|
+ if (userRoleList == null || userRoleList.size() <= 0) {
|
|
|
+ //查看当前项目下是否有监理合同段关联此合同段
|
|
|
+ String sql = "SELECT id from m_contract_info mci WHERE contract_type = 2 and id in (SELECT contract_id_jlyz FROM m_contract_relation_jlyz WHERE contract_id_sg = " + node.getContractId() + ")";
|
|
|
+ ContractInfo contractInfo = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ContractInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (contractInfo != null) {
|
|
|
+ userRoleList = this.saveUserInfoByProjectClient.queryUserContractRole(ids, contractInfo.getId()+"");
|
|
|
+ }
|
|
|
+ }
|
|
|
if (userRoleList == null) {
|
|
|
next.setDisabled(true);
|
|
|
} else {
|
|
@@ -377,10 +386,10 @@ public class EVisaTaskCheckController {
|
|
|
List<JSONObject> userRoleList = this.saveUserInfoByProjectClient.queryUserContractRole(flowLink.stream().map(FixedFlowLink::getFixedFlowLinkUser).distinct().collect(Collectors.toList()),infoList.get(0).getContractId()+"" );
|
|
|
if (userRoleList == null || userRoleList.size() <= 0) {
|
|
|
//查看当前项目下是否有监理合同段关联此合同段
|
|
|
- Long contractId = jdbcTemplate.queryForObject("SELECT id from m_contract_info mci WHERE contract_type = 2 \n" +
|
|
|
- "and id in (SELECT contract_id_jlyz FROM m_contract_relation_jlyz WHERE contract_id_sg = " + infoList.get(0).getContractId()+")",Long.class);
|
|
|
- if (contractId != null) {
|
|
|
- userRoleList = this.saveUserInfoByProjectClient.queryUserContractRole(ids, contractId+"");
|
|
|
+ String sql = "SELECT id from m_contract_info mci WHERE contract_type = 2 and id in (SELECT contract_id_jlyz FROM m_contract_relation_jlyz WHERE contract_id_sg = " + infoList.get(0).getContractId() + ")";
|
|
|
+ ContractInfo contractInfo = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ContractInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (contractInfo != null) {
|
|
|
+ userRoleList = this.saveUserInfoByProjectClient.queryUserContractRole(ids, contractInfo.getId()+"");
|
|
|
}
|
|
|
}
|
|
|
if (userRoleList == null) {
|