|
@@ -63,6 +63,7 @@ import org.springblade.system.user.service.IUserOauthService;
|
|
|
import org.springblade.system.user.service.IUserService;
|
|
|
import org.springblade.system.user.util.FileUtils;
|
|
|
import org.springblade.system.user.util.ForestNodeMerger;
|
|
|
+import org.springblade.system.user.vo.InformationQueryVO1;
|
|
|
import org.springblade.system.user.vo.UserVO;
|
|
|
import org.springblade.system.user.wrapper.UserWrapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -710,7 +711,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<WbsTreeContractLazyVO> lazyQueryContractWbsTree(String id, String contractId, String contractIdRelation, String tableOwner) {
|
|
|
+ public List<WbsTreeContractLazyVO> lazyQueryContractWbsTree(String id, String contractId, String contractIdRelation, String tableOwner,String description) {
|
|
|
if (org.apache.commons.lang.StringUtils.isEmpty(tableOwner)) {
|
|
|
throw new ServiceException("Param error,tableOwner cannot be empty");
|
|
|
}
|
|
@@ -720,6 +721,10 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
if (contractInfo != null) {
|
|
|
/* =========================== 施工合同段 =========================== */
|
|
|
if (new Integer(1).equals(contractInfo.getContractType())) {
|
|
|
+ String condition="AND";
|
|
|
+ if(StringUtil.isEmpty(description)){
|
|
|
+ condition="AND a.is_buss_show!=2 AND";
|
|
|
+ }
|
|
|
String sql = "SELECT is_custom,p_key_id,contract_id," +
|
|
|
"(SELECT id FROM u_contract_tree_drawings WHERE process_id = p_key_id AND is_deleted = 0 limit 1) AS drawingsId," +
|
|
|
"id,parent_id,node_type,type,wbs_type,is_buss_show as isBussShow,is_concrete,major_data_type,partition_code,old_id,contract_id_relation,is_concealed_works_node," +
|
|
@@ -729,11 +734,14 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
" AND b.status = 1 AND b.contract_id = " + contractId + " AND b.is_deleted = 0 ) AS hasChildren," +
|
|
|
"(SELECT CASE WHEN count(1) > 0 THEN 1 ELSE 0 END FROM m_wbs_tree_contract b WHERE b.parent_id = a.id AND b.type = 1" +
|
|
|
" AND b.status = 1 AND b.contract_id = " + contractId + " AND b.is_deleted = 0 AND is_custom = 1) AS isCustomChild " +
|
|
|
- "FROM m_wbs_tree_contract a WHERE a.node_type != 111 AND a.type = 1 AND a.status = 1 AND a.is_deleted = 0 " +
|
|
|
+ "FROM m_wbs_tree_contract a WHERE a.node_type != 111 AND a.type = 1 AND a.status = 1 "+condition+" a.is_deleted = 0 " +
|
|
|
"AND parent_id = " + (StringUtils.isNotEmpty(id) ? id : 0) + " AND contract_id = " + contractId + " " +
|
|
|
"ORDER BY a.sort,title,a.create_time";
|
|
|
+ System.out.println(sql);
|
|
|
List<WbsTreeContractLazyVO> lazyNodes = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WbsTreeContractLazyVO.class));
|
|
|
if (lazyNodes.size() > 0) {
|
|
|
+
|
|
|
+
|
|
|
/*获取当前合同段节点本地缓存信息*/
|
|
|
List<WbsTreeContractLazyVO> nodesAll = this.getNodeAll(contractId);
|
|
|
List<WbsTreeContractLazyVO> distinctNodesAll = nodesAll.stream()
|
|
@@ -1165,6 +1173,21 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
return vo2;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<InformationQueryVO1> queryInformationByContractIdAndName(String contractId, String name) {
|
|
|
+ if (StringUtil.isEmpty(contractId)) {
|
|
|
+ throw new ServiceException("未获取到合同段id");
|
|
|
+ }
|
|
|
+ ContractInfo contract = jdbcTemplate.query("SELECT * FROM m_contract_info WHERE id = " + contractId, new BeanPropertyRowMapper<>(ContractInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (ObjectUtil.isEmpty(contract)) {
|
|
|
+ throw new ServiceException("获取合同段信息失败");
|
|
|
+ }
|
|
|
+ if(!contract.getPId().equals("1792760669353865218")){
|
|
|
+ throw new ServiceException("请输入正确的合同段id");
|
|
|
+ }
|
|
|
+
|
|
|
+ return baseMapper.queryInformationByContractIdAndName(contractId,name);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
private List<PrivateTreeVO> buildTree(List<WbsTreePrivate> wbsTreePrivatesNodes, String projectId) {
|