Browse Source

修改bug

chenr 5 months ago
parent
commit
b753e0b05f

+ 1 - 6
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -1552,12 +1552,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                 String[] strings = StringUtils.strip(tabData[0], "[]").split(",");
                                 reData.put(key + "__" + tabData[1], strings);
                             } else {
-                                if(tabData[0].indexOf(",")>0){
-                                    String[] ss = tabData[0].split(",");
-                                    ss[0]=StringUtils.deleteWhitespace(ss[0]);
-                                    ss[1]=StringUtils.deleteWhitespace(ss[1]);
-                                    reData.put(key + "__" + tabData[1],ss);
-                                }
+                                reData.put(key + "__" + tabData[1],tabData[0]);
                             }
                         }
                     } else {

+ 4 - 3
blade-service/blade-user/src/main/java/org/springblade/system/user/controller/WbsTreeController.java

@@ -49,11 +49,12 @@ public class WbsTreeController extends BladeController {
             @ApiImplicitParam(name = "contractId", value = "合同段id"),
             @ApiImplicitParam(name = "contractIdRelation", value = "合同段关联id(监理、业主合同关联施工合同id)"),
             @ApiImplicitParam(name = "classifyType", value = "合同段区分,施工合同段=1,监理合同段=2"),
-            @ApiImplicitParam(name = "tableOwner", value = "所属方节点权限,施工=1,监理=2,区分节点的数量、颜色")
+            @ApiImplicitParam(name = "tableOwner", value = "所属方节点权限,施工=1,监理=2,区分节点的数量、颜色"),
+            @ApiImplicitParam(name = "description",value = "1资料填报的树节点加载 2隐藏资料的树节点加载")
     })
     public R<List<WbsTreeContractLazyVO>> lazyQueryContractWbsTree(@RequestParam String primaryKeyId, @RequestParam String parentId,
                                                                    @RequestParam String contractId, @RequestParam String contractIdRelation,
-                                                                   @RequestParam String classifyType, @RequestParam String tableOwner) {
+                                                                   @RequestParam String classifyType, @RequestParam String tableOwner,@RequestParam(required = false) String description) {
         if (StringUtils.isNotEmpty(primaryKeyId)) {
             parentId = primaryKeyId;
         }
@@ -76,7 +77,7 @@ public class WbsTreeController extends BladeController {
         if (data != null) {
             vos = JSON.parseArray(data.toString(), WbsTreeContractLazyVO.class);
         } else {
-            vos = iUserService.lazyQueryContractWbsTree(parentId, contractId, contractIdRelation, tableOwner);
+            vos = iUserService.lazyQueryContractWbsTree(parentId, contractId, contractIdRelation, tableOwner,description);
             if (vos != null && ObjectUtil.isNotEmpty(dataInfoId)) {
                 if (("2").equals(classifyType) && ObjectUtil.isNotEmpty(contractIdRelation)) {
                     JSONArray array = JSONArray.parseArray(JSON.toJSONString(vos));

+ 1 - 1
blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserService.java

@@ -227,7 +227,7 @@ public interface IUserService extends BaseService<User> {
 
     List<User> selectUserAll();
 
-    List<WbsTreeContractLazyVO> lazyQueryContractWbsTree(String parentId, String contractId, String contractIdRelation, String tableOwner);
+    List<WbsTreeContractLazyVO> lazyQueryContractWbsTree(String parentId, String contractId, String contractIdRelation, String tableOwner,String description);
 
     void deleteContractLocalCache(String contractId);
 

+ 9 - 2
blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java

@@ -710,7 +710,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 +720,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 +733,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()