Browse Source

附件上传bug修改

cr 1 month ago
parent
commit
c4e8e48ac6

+ 1 - 1
blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/InformationQueryClient.java

@@ -97,7 +97,7 @@ public interface InformationQueryClient {
     void insert(@RequestBody InformationQuery iq);
 
     @PostMapping(API_PREFIX+"/getInfoByWbsId")
-    InformationQuery getInfoByWbsId(@RequestParam Long wbsId);
+    InformationQuery getInfoByWbsId(@RequestParam Long wbsId,@RequestParam Integer classify);
 
     @PostMapping(API_PREFIX+"/updateInformationQuery1")
     void update(@RequestBody  InformationQuery iq);

+ 3 - 2
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/InformationQueryClientImpl.java

@@ -127,10 +127,11 @@ public class InformationQueryClientImpl implements InformationQueryClient {
     }
 
     @Override
-    public InformationQuery getInfoByWbsId(Long wbsId) {
-        return informationQueryMapper.selectOne(new QueryWrapper<InformationQuery>().eq("wbs_id",wbsId));
+    public InformationQuery getInfoByWbsId(Long wbsId,Integer classify) {
+        return informationQueryMapper.selectOne(new QueryWrapper<InformationQuery>().eq("wbs_id",wbsId).eq("classify",classify));
     }
 
+
     @Override
     public void update(InformationQuery iq) {
         informationQueryMapper.updateById(iq);

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

@@ -4451,7 +4451,7 @@ public class ExcelTabController extends BladeController {
             WbsTreeContract wbsTreeContract = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(WbsTreeContract.class));
             if (ObjectUtil.isNotEmpty(wbsTreeContract.getNodeClass())) {
                 if (wbsTreeContract.getNodeClass().equals(Integer.valueOf(2))) {
-                    InformationQuery iq = informationQueryClient.getInfoByWbsId(wbsTreeContract.getPKeyId());
+                    InformationQuery iq = informationQueryClient.getInfoByWbsId(wbsTreeContract.getPKeyId(),classify);
                     if (iq == null) {
                         iq = new InformationQuery();
                         iq.setId(SnowFlakeUtil.getId());

+ 5 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TableFileController.java

@@ -53,6 +53,7 @@ import org.springblade.manager.service.ITableFileService;
 import org.springblade.core.boot.ctrl.BladeController;
 
 import java.rmi.ServerException;
+import java.util.Arrays;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -137,7 +138,10 @@ public class TableFileController extends BladeController {
                 wbsTreeContractService.update(updateWrapper);
                 WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(new QueryWrapper<WbsTreeContract>().eq("p_key_id", tableFile.getTabId()));
                 if(wbsTreeContract.getNodeClass().equals(Integer.valueOf(2))){
-                    InformationQuery infoByWbsId = informationQueryClient.getInfoByWbsId(Long.valueOf(tableFile.getTabId()));
+                    Integer classify =
+                            Arrays.asList("1", "2", "3").contains(wbsTreeContract.getTableOwner()) ? 1 :
+                                    Arrays.asList("4", "5", "6").contains(wbsTreeContract.getTableOwner()) ? 2 : 1;
+                    InformationQuery infoByWbsId = informationQueryClient.getInfoByWbsId(Long.valueOf(tableFile.getTabId()),classify);
                     if(ObjectUtil.isNotEmpty(infoByWbsId)){
                         String sql="DELETE FROM u_information_query WHERE id="+infoByWbsId.getId();
                         jdbcTemplate.execute(sql);