Bläddra i källkod

质检-隔离施工和监理的附件

qianxb 2 månader sedan
förälder
incheckning
6e032b33a3

+ 3 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/TableFile.java

@@ -93,4 +93,7 @@ public class TableFile implements Serializable {
 
     private Long contractId;
 
+    @ApiModelProperty(value = "1施工2监理")
+    private Integer classify;
+
 }

+ 3 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/TaskDetailVO.java

@@ -49,4 +49,7 @@ public class TaskDetailVO implements Serializable {
 
     @ApiModelProperty(value = "意见信息")
     private MeterApproveOpinion meterApproveOpinion;
+
+    @ApiModelProperty(value = "需要计算的key")
+    private List<String> calculateKey;
 }

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

@@ -1815,7 +1815,7 @@ public class ExcelTabController extends BladeController {
                 return R.fail("暂无PDF数据");
             } else {
                 // 由于独立附件 需要追加最后
-                List<TableFileVO> data = tableFileService.selectTableFileListByTen(Long.valueOf(nodeId + ""));
+                List<TableFileVO> data = tableFileService.selectTableFileListByTen(Long.valueOf(nodeId + ""), Integer.valueOf(classify));
                 List<String> datainfo = new ArrayList<>();
 
                 datainfo.add(pdfUrl);
@@ -3940,7 +3940,7 @@ public class ExcelTabController extends BladeController {
             @ApiImplicitParam(name = "nodeId", value = "nodeId", required = true),
 
     })
-    public R addBussFile(@RequestParam("file") MultipartFile[] file, String nodeId,Integer type,Long contractId) {
+    public R addBussFile(@RequestParam("file") MultipartFile[] file, String nodeId,Integer type,Long contractId,Integer classify) {
         List<TableFile> fileList = new ArrayList<>();
         if (file != null && file.length >= 1) {
             for (MultipartFile multipartFile : file) {
@@ -3960,6 +3960,7 @@ public class ExcelTabController extends BladeController {
                 tableFile.setDomainUrl(bladeFile1.getLink());
                 tableFile.setIsDeleted(0);
                 tableFile.setExtension(fileExtension);
+                tableFile.setClassify(classify);
                 fileList.add(tableFile);
             }
             tableFileService.saveOrUpdateBatch(fileList);

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

@@ -224,8 +224,8 @@ public class TableFileController extends BladeController {
     @ApiImplicitParams(value = {
             @ApiImplicitParam(name = "pkeyid", value = "表单pkeyid", required = true),
     })
-    public R selectTableFileListByTen(Long pkeyid) {
-        List<TableFileVO> dataList= tableFileService.selectTableFileListByTen(pkeyid);
+    public R selectTableFileListByTen(Long pkeyid,Integer classify) {
+        List<TableFileVO> dataList= tableFileService.selectTableFileListByTen(pkeyid,classify);
         return R.data(dataList);
     }
 

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

@@ -246,8 +246,8 @@ public class WbsTreeContractController extends BladeController {
     @GetMapping("/search-node-tablesAndFile")
     @ApiOperationSupport(order = 12)
     @ApiOperation(value = "查询当前节点下所有表的附件信息", notes = "传入节点primaryKeyId、type、合同段id、项目id")
-    public R<List<AppWbsTreeContractVO>> searchNodeAllTableAndFile(String primaryKeyId, String type, String contractId, String projectId) {
-        List<AppWbsTreeContractVO> list = iWbsTreeContractService.searchNodeAllTableAndFile(primaryKeyId, type, contractId, projectId);
+    public R<List<AppWbsTreeContractVO>> searchNodeAllTableAndFile(String primaryKeyId, String type, String contractId, String projectId,Integer classify) {
+        List<AppWbsTreeContractVO> list = iWbsTreeContractService.searchNodeAllTableAndFile(primaryKeyId, type, contractId, projectId,classify);
         return R.data(list);
     }
 

+ 2 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TableFileMapper.java

@@ -44,9 +44,9 @@ public interface TableFileMapper extends BaseMapper<TableFile> {
     List<TableFileVO> selectTableFileList(String pKid);
 
 
-    List<TableFileVO> selectTableFileListByTen(String pKid);
+    List<TableFileVO> selectTableFileListByTen(String pKid,@Param("classify") Integer classify);
 
     void delDataById(String id, Long recordId);
 
-    List<TableFile> getAllFileByIds(@Param("ids") List<Long> ids);
+    List<TableFile> getAllFileByIds(@Param("ids") List<Long> ids,@Param("classify") Integer classify);
 }

+ 2 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TableFileMapper.xml

@@ -37,7 +37,7 @@
         select *,domain_url as url from m_table_file where is_deleted = 0 and type=2 and tab_id = #{pKid}
     </select>
     <select id="getAllFileByIds" resultType="org.springblade.manager.entity.TableFile">
-        SELECT mtf.* from m_table_file mtf WHERE  type = 2 and tab_id in
+        SELECT mtf.* from m_table_file mtf WHERE is_deleted = 0 and classify = #{classify} and type = 2 and tab_id in
         <foreach collection="ids" item="id" open="(" close=")" separator=",">
             #{id}
         </foreach>
@@ -51,6 +51,6 @@
     </delete>
 
     <select id="selectTableFileListByTen" resultMap="TableFileVO">
-        select *,domain_url as url from m_table_file where is_deleted = 0 and type in (10,11,12) and tab_id = #{pKid}
+        select *,domain_url as url from m_table_file where is_deleted = 0  and classify = #{classify} and type in (10,11,12) and tab_id = #{pKid}
     </select>
 </mapper>

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

@@ -32,7 +32,7 @@ import java.util.List;
  */
 public interface ITableFileService extends IService<TableFile> {
 
-    List<TableFile> getAllFileByIds(List<Long> list);
+    List<TableFile> getAllFileByIds(List<Long> list,Integer classify);
 
     /**
      * 自定义分页
@@ -47,6 +47,6 @@ public interface ITableFileService extends IService<TableFile> {
 
     void delDataById(String pkid, Long id);
 
-    List<TableFileVO> selectTableFileListByTen(Long pKid);
+    List<TableFileVO> selectTableFileListByTen(Long pKid,Integer classify);
 
 }

+ 3 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IWbsTreeContractService.java

@@ -65,7 +65,7 @@ public interface IWbsTreeContractService extends BaseService<WbsTreeContract> {
 
     boolean syncContractTabSort(String projectId);
 
-    List<AppWbsTreeContractVO> searchNodeAllTableAndFile(String primaryKeyId, String type, String contractId, String projectId);
+    List<AppWbsTreeContractVO> searchNodeAllTableAndFile(String primaryKeyId, String type, String contractId, String projectId,Integer classify);
 
     List<WbsTreeContractLazyVO> getConcealedWorksNodeTree(String contractId, String parentId);
 
@@ -74,4 +74,6 @@ public interface IWbsTreeContractService extends BaseService<WbsTreeContract> {
 
     //获取质检 wbs -湖州绕城
     List<APIWbsContractNodeHzrcVo> apiTreeNodeHzrc(String contractId,Integer classType);
+
+    List<ArchiveSyncWbsVO> getContractAllNode(Long contractId);
 }

+ 4 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TableFileServiceImpl.java

@@ -36,8 +36,8 @@ import java.util.List;
 public class TableFileServiceImpl extends ServiceImpl<TableFileMapper, TableFile> implements ITableFileService {
 
     @Override
-    public List<TableFile> getAllFileByIds(List<Long> ids) {
-        return baseMapper.getAllFileByIds(ids);
+    public List<TableFile> getAllFileByIds(List<Long> ids,Integer classify) {
+        return baseMapper.getAllFileByIds(ids,classify);
     }
 
     @Override
@@ -56,7 +56,7 @@ public class TableFileServiceImpl extends ServiceImpl<TableFileMapper, TableFile
     }
 
     @Override
-    public List<TableFileVO> selectTableFileListByTen(Long pKid) {
-        return baseMapper.selectTableFileListByTen(pKid + "");
+    public List<TableFileVO> selectTableFileListByTen(Long pKid,Integer classify) {
+        return baseMapper.selectTableFileListByTen(pKid + "",classify);
     }
 }

+ 9 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreeContractServiceImpl.java

@@ -989,14 +989,15 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
 
     @Override
     public List<AppWbsTreeContractVO> searchNodeAllTableAndFile(String primaryKeyId, String type, String
-            contractId, String projectId) {
+            contractId, String projectId,Integer classify) {
         List<AppWbsTreeContractVO> vos = this.searchNodeAllTable(primaryKeyId, type, contractId, projectId, null);
         List<AppWbsTreeContractVO> voList = new ArrayList<>();
         List<TableFile> files2 = tableFileService.list(new LambdaQueryWrapper<TableFile>()
-                .eq(TableFile::getTabId,primaryKeyId));
+                .eq(TableFile::getTabId,primaryKeyId)
+                .eq(TableFile::getClassify,classify));
         if (vos != null && vos.size() > 0) {
             List<Long> list = vos.stream().map(AppWbsTreeContractVO::getPKeyId).collect(Collectors.toList());
-            List<TableFile> files = tableFileService.getAllFileByIds(list);
+            List<TableFile> files = tableFileService.getAllFileByIds(list,classify);
             if (files != null && files.size() > 0) {
                 Map<String, List<TableFile>> map = files.parallelStream()
                         .collect(Collectors.groupingBy(TableFile::getTabId));
@@ -1095,6 +1096,11 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
         return ForestNodeMerger.merge(baseMapper.apiTreeNodeHzrc(contractId,classType));
     }
 
+    @Override
+    public List<ArchiveSyncWbsVO> getContractAllNode(Long contractId) {
+        return baseMapper.getContractAllNode(contractId);
+    }
+
     /**
      * 递归获取隐蔽工程节点的所有父级节点
      *

+ 9 - 3
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/TaskController.java

@@ -110,8 +110,7 @@ import java.util.function.Function;
 import java.util.regex.Matcher;
 import java.util.stream.Collectors;
 
-import static org.bouncycastle.asn1.x500.style.RFC4519Style.l;
-import static org.bouncycastle.asn1.x500.style.RFC4519Style.o;
+import static org.bouncycastle.asn1.x500.style.RFC4519Style.*;
 
 @RestController
 @AllArgsConstructor
@@ -1445,6 +1444,13 @@ public class TaskController extends BladeController {
                                     tableData = dataInfo;
                                 }
                                 vo.setTableData(tableData);
+                                //设置需要计算的key,按照顺序,本期-截至上期-已累计
+                                List<String> str = new ArrayList<>();
+                                str.add(map.get("造价机构现场咨询意见_本期审核进度款(元)"));
+                                str.add(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)"));
+                                str.add(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)_截止本期已累计审核进度款(元)"));
+                                vo.setCalculateKey(str);
+
                             } else {
                                 if (StringUtils.isNotBlank(task.getAttachmentPdfUrl())) {
                                     vo.setOpinionType(2);
@@ -4390,7 +4396,7 @@ public class TaskController extends BladeController {
 //        strings.add("意见发出日期:");
 //        strings.add("申请进度款摘录_摘录人_时间");
         strings.add("造价机构现场咨询意见_截止上期已累计审批进度款(元)");
-//        strings.add("造价机构现场咨询意见_截止上期已累计审批进度款(元)_截止本期已累计审核进度款(元)");
+        strings.add("造价机构现场咨询意见_截止上期已累计审批进度款(元)_截止本期已累计审核进度款(元)");
         strings.add("造价机构现场咨询意见_现场造价人员");
         strings.add("造价机构现场咨询意见_现场造价人员_负责人");
         strings.add("建设单位签收");