liuyc 2 年之前
父节点
当前提交
c7cb732e99

+ 6 - 1
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsTreeContractClient.java

@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
 import static org.springblade.core.launch.constant.AppConstant.APPLICATION_NAME_PREFIX;
 import static org.springblade.core.launch.constant.AppConstant.APPLICATION_NAME_PREFIX;
@@ -140,5 +141,9 @@ public interface WbsTreeContractClient {
     List<WbsTreeContract> selectContractTreeAll(@RequestParam String contractId);
     List<WbsTreeContract> selectContractTreeAll(@RequestParam String contractId);
 
 
     @GetMapping(API_PREFIX + "/getContractWbsTreeByParentId")
     @GetMapping(API_PREFIX + "/getContractWbsTreeByParentId")
-    List<WbsTreeContract> getContractWbsTreeByParentId(@RequestParam String parentId,@RequestParam String contractId);
+    List<WbsTreeContract> getContractWbsTreeByParentId(@RequestParam String parentId, @RequestParam String contractId);
+
+    @PostMapping(API_PREFIX + "/diySort")
+    boolean diySort(@RequestBody List<String> sortLists);
+
 }
 }

+ 27 - 12
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -1011,9 +1011,9 @@ public class InformationWriteQueryController extends BladeController {
     public R<Boolean> diySort(@RequestBody DiySortVO vo) {
     public R<Boolean> diySort(@RequestBody DiySortVO vo) {
         //对整棵树进行排序(资料查询需要同步显示排序)采用自增
         //对整棵树进行排序(资料查询需要同步显示排序)采用自增
         List<String> sortLists = vo.getSortList();
         List<String> sortLists = vo.getSortList();
-        String id = sortLists.stream().map(String::valueOf).findAny().orElse(null);
-        WbsTreeContract wbsTreeContract = wbsTreeContractClient.getContractNodeByPrimaryKeyId(id);
 
 
+        /*String id = sortLists.stream().map(String::valueOf).findAny().orElse(null);
+        WbsTreeContract wbsTreeContract = wbsTreeContractClient.getContractNodeByPrimaryKeyId(id);
         //当前项目全部填报资料
         //当前项目全部填报资料
         List<InformationQuery> informationQueries = informationQueryService.getBaseMapper().selectList(Wrappers.<InformationQuery>lambdaQuery()
         List<InformationQuery> informationQueries = informationQueryService.getBaseMapper().selectList(Wrappers.<InformationQuery>lambdaQuery()
                 .eq(InformationQuery::getProjectId, wbsTreeContract.getProjectId())
                 .eq(InformationQuery::getProjectId, wbsTreeContract.getProjectId())
@@ -1031,7 +1031,7 @@ public class InformationWriteQueryController extends BladeController {
             List<WbsTreeContract> rootNodes = list.stream().filter(f -> ObjectUtil.isNotEmpty(f.getParentId()) && f.getParentId() == 0).collect(Collectors.toList());
             List<WbsTreeContract> rootNodes = list.stream().filter(f -> ObjectUtil.isNotEmpty(f.getParentId()) && f.getParentId() == 0).collect(Collectors.toList());
             List<InformationQuery> infos = new ArrayList<>();
             List<InformationQuery> infos = new ArrayList<>();
             int sort = 2;
             int sort = 2;
-            this.diySortRecursion(list, rootNodes, sort, informationQueries, infos);
+            //this.diySortRecursion(list, rootNodes, sort, informationQueries, infos);
 
 
             //修改资料查询sort、节点sort
             //修改资料查询sort、节点sort
             for (InformationQuery info : infos) {
             for (InformationQuery info : infos) {
@@ -1055,13 +1055,13 @@ public class InformationWriteQueryController extends BladeController {
                     }
                     }
                 }
                 }
             }
             }
-            return R.data(true);
-        }
-        return R.data(false);
+            */
+
+        return R.status(wbsTreeContractClient.diySort(sortLists));
     }
     }
 
 
     //递归排序
     //递归排序
-    private void diySortRecursion(List<WbsTreeContract> list, List<WbsTreeContract> rootNodes, int sort, List<InformationQuery> informationQueries, List<InformationQuery> infos) {
+    /*private void diySortRecursion(List<WbsTreeContract> list, List<WbsTreeContract> rootNodes, int sort, List<InformationQuery> informationQueries, List<InformationQuery> infos) {
         if (ObjectUtil.isNotEmpty(rootNodes)) {
         if (ObjectUtil.isNotEmpty(rootNodes)) {
             List<WbsTreeContract> parentNodes = new ArrayList<>();
             List<WbsTreeContract> parentNodes = new ArrayList<>();
             for (WbsTreeContract wbsTreeContract : list) {
             for (WbsTreeContract wbsTreeContract : list) {
@@ -1087,7 +1087,7 @@ public class InformationWriteQueryController extends BladeController {
                 this.diySortRecursion(list, parentNodes, sort, informationQueries, infos);
                 this.diySortRecursion(list, parentNodes, sort, informationQueries, infos);
             }
             }
         }
         }
-    }
+    }*/
 
 
     /**
     /**
      * 复制节点
      * 复制节点
@@ -1160,7 +1160,6 @@ public class InformationWriteQueryController extends BladeController {
                         newData.setOldId(node.getId().toString());
                         newData.setOldId(node.getId().toString());
                     }
                     }
 
 
-
                     //设置新ID
                     //设置新ID
                     if (new Integer("1").equals(node.getType())) {
                     if (new Integer("1").equals(node.getType())) {
                         //如果是节点类型才重塑ID
                         //如果是节点类型才重塑ID
@@ -1188,6 +1187,14 @@ public class InformationWriteQueryController extends BladeController {
                     newData.setPdfUrl(null);
                     newData.setPdfUrl(null);
                     newData.setCreateUser(AuthUtil.getUserId());
                     newData.setCreateUser(AuthUtil.getUserId());
 
 
+                    //获取当前所有复制的节点的最大sort
+                    String sql = "select sort from m_wbs_tree_contract where contract_id = '" + node.getContractId() + "' and (id = '" + node.getId() + "' or old_id = '" + node.getId() + "')";
+                    List<WbsTreeContract> query = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WbsTreeContract.class));
+                    List<Integer> collect = query.stream().map(WbsTreeContract::getSort).collect(Collectors.toList());
+                    Integer max = collect.stream().reduce(collect.get(0), Integer::max);
+                    //设置sort
+                    newData.setSort(max);
+
                     //重塑父节点关联关系
                     //重塑父节点关联关系
                     this.restoreParent(newData, oldToNewIdMap);
                     this.restoreParent(newData, oldToNewIdMap);
 
 
@@ -1682,6 +1689,14 @@ public class InformationWriteQueryController extends BladeController {
                     newData.setIsTypePrivatePid(half.getPKeyId());
                     newData.setIsTypePrivatePid(half.getPKeyId());
                 }
                 }
 
 
+                //获取当前所有复制的节点的最大sort
+                String sql = "select sort from m_wbs_tree_contract where contract_id = '" + treeContract.getContractId() + "' and (id = '" + half.getId() + "' or old_id = '" + half.getId() + "')";
+                List<WbsTreeContract> query = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WbsTreeContract.class));
+                List<Integer> collect = query.stream().map(WbsTreeContract::getSort).collect(Collectors.toList());
+                Integer max = collect.stream().reduce(collect.get(0), Integer::max);
+                //设置sort
+                newData.setSort(max);
+
                 //设置节点名称
                 //设置节点名称
                 for (AddContractTreeNodeVO.Node addVO : selectList) {
                 for (AddContractTreeNodeVO.Node addVO : selectList) {
                     if (half.getPKeyId().toString().equals(addVO.getPrimaryKeyId())) {
                     if (half.getPKeyId().toString().equals(addVO.getPrimaryKeyId())) {
@@ -1969,9 +1984,9 @@ public class InformationWriteQueryController extends BladeController {
 
 
         if (!new Integer("6").equals(node.getNodeType()) && !Arrays.asList("1,2,3,4".split(",")).contains(node.getMajorDataType().toString())) {
         if (!new Integer("6").equals(node.getNodeType()) && !Arrays.asList("1,2,3,4".split(",")).contains(node.getMajorDataType().toString())) {
             //不是工序,则查询当前节点下的所有填报节点
             //不是工序,则查询当前节点下的所有填报节点
-            if (node.getParentId() == 0){
+            if (node.getParentId() == 0) {
                 String contractId = node.getContractId();
                 String contractId = node.getContractId();
-                List<WbsTreeContract> treeS = wbsTreeContractClient.getContractWbsTreeByParentId(node.getId().toString(),contractId);
+                List<WbsTreeContract> treeS = wbsTreeContractClient.getContractWbsTreeByParentId(node.getId().toString(), contractId);
                 for (WbsTreeContract tree : treeS) {
                 for (WbsTreeContract tree : treeS) {
                     List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(tree.getId().toString(), contract.getContractType(), StringUtils.isNotEmpty(vo.getContractIdRelation()) ? vo.getContractIdRelation() : vo.getContractId().toString());
                     List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(tree.getId().toString(), contract.getContractType(), StringUtils.isNotEmpty(vo.getContractIdRelation()) ? vo.getContractIdRelation() : vo.getContractId().toString());
                     if (queryDataResult != null && queryDataResult.size() > 0) {
                     if (queryDataResult != null && queryDataResult.size() > 0) {
@@ -1979,7 +1994,7 @@ public class InformationWriteQueryController extends BladeController {
                         queryDataResult.clear();
                         queryDataResult.clear();
                     }
                     }
                 }
                 }
-            }else {
+            } else {
                 List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(node.getId().toString(), contract.getContractType(), StringUtils.isNotEmpty(vo.getContractIdRelation()) ? vo.getContractIdRelation() : vo.getContractId().toString());
                 List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(node.getId().toString(), contract.getContractType(), StringUtils.isNotEmpty(vo.getContractIdRelation()) ? vo.getContractIdRelation() : vo.getContractId().toString());
                 if (StringUtils.isNotEmpty(vo.getIsFirst())) {
                 if (StringUtils.isNotEmpty(vo.getIsFirst())) {
                     //如果是首件列表请求,则删掉没有标记为首件的数据
                     //如果是首件列表请求,则删掉没有标记为首件的数据

+ 2 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml

@@ -172,6 +172,7 @@
         and wtc.node_type != 111
         and wtc.node_type != 111
         and wtc.type = 1
         and wtc.type = 1
         and wtc.is_deleted= '0'
         and wtc.is_deleted= '0'
+        ORDER BY wtc.sort,wtc.create_time
     </select>
     </select>
 
 
     <select id="queryContractTree" resultMap="queryContractTreeMap">
     <select id="queryContractTree" resultMap="queryContractTreeMap">
@@ -257,7 +258,7 @@
         AND wtc.parent_id = #{parentId}
         AND wtc.parent_id = #{parentId}
         AND wtc.node_type != 111
         AND wtc.node_type != 111
         AND wtc.is_deleted= '0'
         AND wtc.is_deleted= '0'
-        ORDER BY wtc.sort
+        ORDER BY wtc.sort,wtc.create_time
     </select>
     </select>
 
 
     <select id="queryProcessDataByPrimaryKeyIdAndClassify" resultMap="queryProcessDataMap">
     <select id="queryProcessDataByPrimaryKeyIdAndClassify" resultMap="queryProcessDataMap">

+ 2 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -452,8 +452,8 @@ public class ExcelTabController extends BladeController {
             @ApiImplicitParam(name = "tabId", value = "表Id", required = true),
             @ApiImplicitParam(name = "tabId", value = "表Id", required = true),
     })
     })
     public R<List<ExceTabTreVO>> saveLinkeTab(Long exceTabId, Long tabId) throws IOException {
     public R<List<ExceTabTreVO>> saveLinkeTab(Long exceTabId, Long tabId) throws IOException {
-        //String file_path =ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
-        String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        String file_path =ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        //String file_path = "C:\\Users\\泓创开发\\Desktop";
 
 
         // 关联 私有项目 wbs 数据信息
         // 关联 私有项目 wbs 数据信息
         WbsTreePrivate wbsTree = new WbsTreePrivate();
         WbsTreePrivate wbsTree = new WbsTreePrivate();

+ 14 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/WbsTreeContractClientImpl.java

@@ -20,6 +20,7 @@ import org.springblade.manager.vo.WbsTreeContractTreeVOS;
 import org.springblade.system.entity.DictBiz;
 import org.springblade.system.entity.DictBiz;
 import org.springblade.system.feign.IDictBizClient;
 import org.springblade.system.feign.IDictBizClient;
 import org.springblade.system.feign.ISysClient;
 import org.springblade.system.feign.ISysClient;
+import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
 import java.util.*;
 import java.util.*;
@@ -200,13 +201,23 @@ public class WbsTreeContractClientImpl implements WbsTreeContractClient {
     }
     }
 
 
     @Override
     @Override
-    public List<WbsTreeContract> getContractWbsTreeByParentId(String parentId,String contractId) {
+    public List<WbsTreeContract> getContractWbsTreeByParentId(String parentId, String contractId) {
         LambdaQueryWrapper<WbsTreeContract> wrapper = new LambdaQueryWrapper<>();
         LambdaQueryWrapper<WbsTreeContract> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(WbsTreeContract::getParentId,parentId);
-        wrapper.eq(WbsTreeContract::getContractId,contractId);
+        wrapper.eq(WbsTreeContract::getParentId, parentId);
+        wrapper.eq(WbsTreeContract::getContractId, contractId);
         return this.wbsTreeContractService.list(wrapper);
         return this.wbsTreeContractService.list(wrapper);
     }
     }
 
 
+    @Override
+    public boolean diySort(List<String> sortLists) {
+        int sort = 1;
+        for (String pKeyId : sortLists) {
+            WbsTreeContract sortNode = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, pKeyId));
+            wbsTreeContractService.update(Wrappers.<WbsTreeContract>lambdaUpdate().set(WbsTreeContract::getSort, sort++).eq(WbsTreeContract::getPKeyId, sortNode.getPKeyId()));
+        }
+        return true;
+    }
+
     @Override
     @Override
     public List<WbsTreeContractTreeVOS> queryCurrentContractLogList(String contractId) {
     public List<WbsTreeContractTreeVOS> queryCurrentContractLogList(String contractId) {
         ContractInfo contract = this.contractInfoService.getById(contractId);
         ContractInfo contract = this.contractInfoService.getById(contractId);

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

@@ -685,7 +685,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     }
     }
 
 
 
 
-    public TransactionStatus beginTransaction(DataSourceTransactionManager transactionManager){
+    public TransactionStatus beginTransaction(DataSourceTransactionManager transactionManager) {
         DefaultTransactionDefinition def = new DefaultTransactionDefinition();//事务定义类
         DefaultTransactionDefinition def = new DefaultTransactionDefinition();//事务定义类
         def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
         def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
         TransactionStatus status = transactionManager.getTransaction(def);// 返回事务对象
         TransactionStatus status = transactionManager.getTransaction(def);// 返回事务对象
@@ -747,7 +747,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                         jdbcTemplate.execute(delSql);
                         jdbcTemplate.execute(delSql);
                         jdbcTemplate.execute(sqlInfo);
                         jdbcTemplate.execute(sqlInfo);
                         transactionManager1.commit(transactionStatus);
                         transactionManager1.commit(transactionStatus);
-                    }catch (Exception e){
+                    } catch (Exception e) {
                         transactionManager1.rollback(transactionStatus);
                         transactionManager1.rollback(transactionStatus);
                         e.printStackTrace();
                         e.printStackTrace();
                     }
                     }
@@ -946,7 +946,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             for (String key : mysqlData.keySet()) {
             for (String key : mysqlData.keySet()) {
                 String tabVal = mysqlData.get(key) + "";
                 String tabVal = mysqlData.get(key) + "";
                 // 时间段处理
                 // 时间段处理
-                if (StringUtils.isNotEmpty(tabVal) && tabVal.indexOf("null")<0) {
+                if (StringUtils.isNotEmpty(tabVal) && tabVal.indexOf("null") < 0) {
                     if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z]") >= 0) {
                     if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z]") >= 0) {
                         String[] tabData = tabVal.split("_\\^_");
                         String[] tabData = tabVal.split("_\\^_");
 
 
@@ -1031,7 +1031,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     public R getBussPdfInfo(Long pkeyId) throws Exception {
     public R getBussPdfInfo(Long pkeyId) throws Exception {
 
 
         //String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
         //String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
-        String file_path = "/Users/hongchuangyanfa/Desktop/";//ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        String file_path = "C:\\Users\\泓创开发\\Desktop";//ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
 
 
         WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
         WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
                 .eq(WbsTreeContract::getPKeyId, pkeyId));
                 .eq(WbsTreeContract::getPKeyId, pkeyId));
@@ -1072,27 +1072,27 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
 
         int all = sheet.getRow(0).getLastCellNum();
         int all = sheet.getRow(0).getLastCellNum();
         int mergedCellCnt = sheet.getNumMergedRegions();
         int mergedCellCnt = sheet.getNumMergedRegions();
-        List<Map<String,Integer>> titleList = new ArrayList<>();
-        for (int i = 0; i < mergedCellCnt-1; i++) {
+        List<Map<String, Integer>> titleList = new ArrayList<>();
+        for (int i = 0; i < mergedCellCnt - 1; i++) {
             CellRangeAddress mergedCell = sheet.getMergedRegion(i);
             CellRangeAddress mergedCell = sheet.getMergedRegion(i);
-            int xx =mergedCell.getNumberOfCells();
-            if(xx==all){
+            int xx = mergedCell.getNumberOfCells();
+            if (xx == all) {
                 int fisRow = mergedCell.getFirstRow();
                 int fisRow = mergedCell.getFirstRow();
                 int firsrCol = mergedCell.getFirstColumn();
                 int firsrCol = mergedCell.getFirstColumn();
                 Cell cell = sheet.getRow(fisRow).getCell(firsrCol);
                 Cell cell = sheet.getRow(fisRow).getCell(firsrCol);
                 short fontIndex = cell.getCellStyle().getFontIndex();
                 short fontIndex = cell.getCellStyle().getFontIndex();
                 Font fontAt = workbook.getFontAt(fontIndex);
                 Font fontAt = workbook.getFontAt(fontIndex);
                 short fontHeightInPoints = fontAt.getFontHeightInPoints();
                 short fontHeightInPoints = fontAt.getFontHeightInPoints();
-                if(fontHeightInPoints>=14){
-                    Map<String,Integer> titleMap = new HashMap<>();
-                    titleMap.put("index",i);
-                    titleMap.put("x",firsrCol);
-                    titleMap.put("y",fisRow);
+                if (fontHeightInPoints >= 14) {
+                    Map<String, Integer> titleMap = new HashMap<>();
+                    titleMap.put("index", i);
+                    titleMap.put("x", firsrCol);
+                    titleMap.put("y", fisRow);
                     String data = cell.getStringCellValue();
                     String data = cell.getStringCellValue();
-                    if(StringUtils.isNotEmpty(data)){
-                        titleMap.put("val",2);
-                    }else{
-                        titleMap.put("val",1);
+                    if (StringUtils.isNotEmpty(data)) {
+                        titleMap.put("val", 2);
+                    } else {
+                        titleMap.put("val", 1);
                     }
                     }
                     titleList.add(titleMap);
                     titleList.add(titleMap);
                 }
                 }
@@ -1101,18 +1101,18 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
 
         //添加标题
         //添加标题
         System.out.println(titleList.size());
         System.out.println(titleList.size());
-        if(titleList!=null){
-            if(titleList.size()==1){
-                Map<String,Integer> titData = titleList.get(0);
-                if(titData.get("val")==1){
+        if (titleList != null) {
+            if (titleList.size() == 1) {
+                Map<String, Integer> titData = titleList.get(0);
+                if (titData.get("val") == 1) {
                     Cell cell = sheet.getRow(titData.get("y")).getCell(titData.get("x"));
                     Cell cell = sheet.getRow(titData.get("y")).getCell(titData.get("x"));
                     cell.setCellValue(projectInfo.getProjectName());
                     cell.setCellValue(projectInfo.getProjectName());
                 }
                 }
-            }else if(titleList.size()>=2){
-                for(int i=0;i<titleList.size();i++){
-                    Map<String,Integer> titData = titleList.get(i);
-                    if(titData.get("val")==2){
-                        Map<String,Integer> titData2 = titleList.get(i-1);
+            } else if (titleList.size() >= 2) {
+                for (int i = 0; i < titleList.size(); i++) {
+                    Map<String, Integer> titData = titleList.get(i);
+                    if (titData.get("val") == 2) {
+                        Map<String, Integer> titData2 = titleList.get(i - 1);
                         Cell cell = sheet.getRow(titData2.get("y")).getCell(titData2.get("x"));
                         Cell cell = sheet.getRow(titData2.get("y")).getCell(titData2.get("x"));
                         cell.setCellValue(projectInfo.getProjectName());
                         cell.setCellValue(projectInfo.getProjectName());
                     }
                     }
@@ -1185,7 +1185,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                     InputStream imageIn = CommonUtil.getOSSInputStream(myData);
                                     InputStream imageIn = CommonUtil.getOSSInputStream(myData);
                                     byte[] bytes = IOUtils.toByteArray(imageIn);
                                     byte[] bytes = IOUtils.toByteArray(imageIn);
                                     // 这里根据实际需求选择图片类型
                                     // 这里根据实际需求选择图片类型
-                                    int pictureIdx = workbook.addPicture(bytes,6);
+                                    int pictureIdx = workbook.addPicture(bytes, 6);
 
 
                                     CreationHelper helper = workbook.getCreationHelper();
                                     CreationHelper helper = workbook.getCreationHelper();
                                     ClientAnchor anchor = helper.createClientAnchor();
                                     ClientAnchor anchor = helper.createClientAnchor();
@@ -1198,19 +1198,19 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                     anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE);
                                     anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE);
                                     // 插入图片
                                     // 插入图片
                                     Picture pict = drawing.createPicture(anchor, pictureIdx); // 调整图片占单元格百分比的大小,1.0就是100%
                                     Picture pict = drawing.createPicture(anchor, pictureIdx); // 调整图片占单元格百分比的大小,1.0就是100%
-                                    pict.resize(1,1);
-                                    FileUtils.imageOrientation(sheet, anchor, new DataVO(x1-1, y1-1) );
+                                    pict.resize(1, 1);
+                                    FileUtils.imageOrientation(sheet, anchor, new DataVO(x1 - 1, y1 - 1));
 
 
-                                } else if(myData.equals("1") && data.html().indexOf("hc-form-checkbox-group")>=0){
-                                    Cell cell = sheet.getRow(y1-1).getCell(x1-1);
-                                    String exceVal = cell.getStringCellValue().replaceAll(" ","");
+                                } else if (myData.equals("1") && data.html().indexOf("hc-form-checkbox-group") >= 0) {
+                                    Cell cell = sheet.getRow(y1 - 1).getCell(x1 - 1);
+                                    String exceVal = cell.getStringCellValue().replaceAll(" ", "");
                                     short fontIndex = cell.getCellStyle().getFontIndex();
                                     short fontIndex = cell.getCellStyle().getFontIndex();
                                     Font fontAt = workbook.getFontAt(fontIndex);
                                     Font fontAt = workbook.getFontAt(fontIndex);
                                     fontAt.setFontName("EUDC");
                                     fontAt.setFontName("EUDC");
-                                    cell.setCellValue(exceVal.replace("□","\u2611"));
-                                }else {
-                                     Cell cell = sheet.getRow(y1-1).getCell(x1-1);
-                                     cell.setCellValue(myData);
+                                    cell.setCellValue(exceVal.replace("□", "\u2611"));
+                                } else {
+                                    Cell cell = sheet.getRow(y1 - 1).getCell(x1 - 1);
+                                    cell.setCellValue(myData);
 
 
 
 
                                 }
                                 }
@@ -1237,7 +1237,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                         }
                         }
                         int y1 = Integer.parseInt(data.children().get(0).attr("y1"));
                         int y1 = Integer.parseInt(data.children().get(0).attr("y1"));
 
 
-                        Cell cell = sheet.getRow(y1-1).getCell(x1-1);
+                        Cell cell = sheet.getRow(y1 - 1).getCell(x1 - 1);
                         cell.setCellValue(e.getId() + "");
                         cell.setCellValue(e.getId() + "");
                         short fontIndex = cell.getCellStyle().getFontIndex();
                         short fontIndex = cell.getCellStyle().getFontIndex();
                         Font oldfontAt = workbook.getFontAt(fontIndex);
                         Font oldfontAt = workbook.getFontAt(fontIndex);
@@ -1254,7 +1254,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             }
             }
         }
         }
 
 
-      //  wb.saveToFile(excelPath, ExcelVersion.Version2010);
+        //  wb.saveToFile(excelPath, ExcelVersion.Version2010);
         //输出流
         //输出流
         FileOutputStream outputStream = new FileOutputStream(excelPath);
         FileOutputStream outputStream = new FileOutputStream(excelPath);
         workbook.write(outputStream);
         workbook.write(outputStream);
@@ -1312,8 +1312,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
 
     @Override
     @Override
     public void getBussPdfs(String nodeId, String classify, String contractId, String projectId) throws Exception {
     public void getBussPdfs(String nodeId, String classify, String contractId, String projectId) throws Exception {
-        //String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
-        String file_path = "/Users/hongchuangyanfa/Desktop/" ;//ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        //String file_path = "/Users/hongchuangyanfa/Desktop/";//ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
         // 获取有权限的节点信息
         // 获取有权限的节点信息
         List<AppWbsTreeContractVO> wbsTreeContractList = wbsTreeContractService.searchNodeAllTable(nodeId, classify, contractId, projectId);
         List<AppWbsTreeContractVO> wbsTreeContractList = wbsTreeContractService.searchNodeAllTable(nodeId, classify, contractId, projectId);
         List<String> data = new ArrayList<>();
         List<String> data = new ArrayList<>();
@@ -1341,15 +1341,15 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         FileUtils.mergePdfPublicMethods(data, listPdf);
         FileUtils.mergePdfPublicMethods(data, listPdf);
         BladeFile bladeFile = this.newIOSSClient.uploadFile(nodeId + ".pdf", listPdf);
         BladeFile bladeFile = this.newIOSSClient.uploadFile(nodeId + ".pdf", listPdf);
 
 
+        //获取当前填报节点sort
+        WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, nodeId));
+
         // 合并pdf集合
         // 合并pdf集合
-        String sql = "update u_information_query set pdf_url ='" + bladeFile.getLink() + "' where classify='" + classify + "' and  wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' ";
+        String sql = "update u_information_query set pdf_url ='" + bladeFile.getLink() + "' ,sort = " + (ObjectUtil.isNotEmpty(wbsTreeContract) ? wbsTreeContract.getSort() : 0) + " where classify='" + classify + "' and  wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' ";
         jdbcTemplate.execute(sql);
         jdbcTemplate.execute(sql);
     }
     }
 
 
 
 
-
-
-
     /**
     /**
      * 试验 获取填报信息
      * 试验 获取填报信息
      */
      */