zhuwei před 1 dnem
rodič
revize
8cc819140a

+ 34 - 1
blade-service/blade-business/src/main/java/org/springblade/business/controller/EVisaTaskCheckController.java

@@ -340,7 +340,40 @@ public class EVisaTaskCheckController {
             @ApiImplicitParam(name = "theLogPrimaryKeyId", value = "日志左侧所选的填报类型ID"),
             @ApiImplicitParam(name = "firstId", value = "首件记录ID,列表批量上报时传任意一个即可")
     })
-    public R<IPage<FixedFlowVO>> queryFixedFlow(@RequestBody JSONObject json) {
+    public R<List<FixedFlowVO>> queryFixedFlow(@RequestBody JSONObject json) {
+        ExecutionTime executionTime = new ExecutionTime();
+        List<FixedFlowVO> flowList = this.fixedFlowService.getFixedFlowList(json.getLong("contractId"), json.getLong("projectId"));
+        //获取对应表格的所有电签配置
+        String tableOwner = json.getString("tableOwner");
+        if (StringUtils.isBlank(tableOwner)) {
+            tableOwner = json.getString("classifyType"); //1 施工方  2监理  3 业主
+        }
+        Long contractId=0L;
+        if(json.getLong("contractIdRelation")!=null){
+            contractId=json.getLong("contractIdRelation");
+        }else {
+            contractId=json.getLong("contractId");
+        }
+        //查询当前节点的PDF
+        InformationQuery node = informationQueryService.getOne(new LambdaQueryWrapper<InformationQuery>()
+                .eq(InformationQuery::getWbsId, json.getString("nodeId"))
+                .eq(InformationQuery::getContractId, contractId)
+                .eq(InformationQuery::getClassify, tableOwner).last("ORDER BY id DESC limit 1"));
+
+        if (node == null || StringUtils.isBlank(node.getPdfUrl())) {
+            return R.fail(300, "当前节点还未生成PDF,不能上报");
+        }
+        List<JSONObject> jsonList = this.queryTableEVisaConfig(json, node.getPdfUrl());
+
+        if (jsonList == null || jsonList.size() == 0) {
+            return R.fail(300, "未找到符合电签配置的相关流程,请重新保存再上报");
+        }
+
+        executionTime.info("d第一阶段结束");
+        return R.data(flowList);
+    }
+
+    public R<IPage<FixedFlowVO>> queryFixedFlowOld(@RequestBody JSONObject json) {
         //获取所有流程
         ExecutionTime executionTime = new ExecutionTime();
         FixedFlowVO vo = new FixedFlowVO();

+ 2 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/FixedFlowMapper.java

@@ -22,4 +22,6 @@ public interface FixedFlowMapper extends BaseMapper<FixedFlow> {
      */
     List<FixedFlow> selectFixedFlowPage(@Param("current") Long current, @Param("size") Integer size, @Param("vo") FixedFlowVO vo);
 
+    List<FixedFlowVO> getFixedFlowList(@Param("contractId") Long contractId, @Param("projectId") Long projectId);
+
 }

+ 9 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/FixedFlowMapper.xml

@@ -39,4 +39,13 @@
         order by sort ASC limit ${current}, ${size}
     </select>
 
+    <select id="getFixedFlowList" resultType="org.springblade.business.vo.FixedFlowVO">
+        select a.*,
+               (select  group_concat(fixed_flow_link_user_name) from u_fixed_flow_link where is_deleted = 0 and fixed_flow_id =a.id GROUP BY fixed_flow_id order by fixed_flow_link_sort ASC) as linkUserJoinString,
+               (SELECT COUNT(*)>1 FROM u_task WHERE fixed_flow_id = a.id AND is_deleted = 0 And status !=3) as deletedIs
+        from u_fixed_flow a where a.is_deleted = 0 AND ( a.is_meter != 1 OR a.is_meter IS NULL )
+          and project_id = #{projectId}
+          and contract_id = #{contractId}
+        order by sort ASC
+    </select>
 </mapper>

+ 3 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/IFixedFlowService.java

@@ -5,6 +5,8 @@ import org.springblade.business.vo.FixedFlowVO;
 import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
+import java.util.List;
+
 /**
  * 服务类
  *
@@ -18,4 +20,5 @@ public interface IFixedFlowService extends BaseService<FixedFlow> {
      */
     IPage<FixedFlowVO> selectFixedFlowPage(FixedFlowVO vo);
 
+    List<FixedFlowVO> getFixedFlowList(Long contractId, Long projectId);
 }

+ 6 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/FixedFlowServiceImpl.java

@@ -30,6 +30,7 @@ import org.springblade.core.mp.support.Condition;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -77,4 +78,9 @@ public class FixedFlowServiceImpl extends BaseServiceImpl<FixedFlowMapper, Fixed
         return iPage.setRecords(resultVO);
     }
 
+    @Override
+    public List<FixedFlowVO> getFixedFlowList(Long contractId, Long projectId) {
+        return  this.baseMapper.getFixedFlowList(contractId, projectId);
+    }
+
 }