Prechádzať zdrojové kódy

bug

Signed-off-by: liuyc <56808083@qq.com>
liuyc 8 mesiacov pred
rodič
commit
643de53cd3

+ 3 - 3
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/FixedFlow.java

@@ -44,10 +44,10 @@ public class FixedFlow extends BaseEntity {
     @ApiModelProperty("合同段ID")
     private Long contractId;
 
-    /**
-     * 流程名称
-     */
+    @ApiModelProperty("流程名称")
     private String fixedFlowName;
 
+    @ApiModelProperty("是否是计量系统 1=是")
+    private Integer isMeter;
 
 }

+ 5 - 1
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/TaskClientImpl.java

@@ -207,6 +207,7 @@ public class TaskClientImpl implements TaskClient {
         fixedFlow.setProjectId(projectId);
         fixedFlow.setContractId(contractId);
         fixedFlow.setStatus(1);
+        fixedFlow.setIsMeter(1);
         fixedFlow.setCreateTime(new Date());
         return fixedFlowServiceImpl.save(fixedFlow);
     }
@@ -246,7 +247,10 @@ public class TaskClientImpl implements TaskClient {
     public List<Map<String, Object>> getFixedFlowPage(PageFixedFlowDTO dto) {
         Page<FixedFlow> page = new Page<>(dto.getCurrent(), dto.getSize());
         IPage<FixedFlow> fixedFlowsPage = fixedFlowServiceImpl.getBaseMapper().selectPage(page,
-                Wrappers.<FixedFlow>lambdaQuery().eq(FixedFlow::getContractId, dto.getContractId()).eq(FixedFlow::getProjectId, dto.getProjectId()));
+                Wrappers.<FixedFlow>lambdaQuery()
+                        .eq(FixedFlow::getIsMeter, 1)
+                        .eq(FixedFlow::getContractId, dto.getContractId())
+                        .eq(FixedFlow::getProjectId, dto.getProjectId()));
         List<FixedFlow> fixedFlows = fixedFlowsPage.getRecords();
         List<Long> collect = fixedFlows.stream().map(FixedFlow::getId).collect(Collectors.toList());
         if (collect.size() > 0) {

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

@@ -21,6 +21,7 @@
         select count(id)
         from u_fixed_flow
         where is_deleted = 0
+          and is_meter != 1
           and project_id = #{vo.projectId}
           and contract_id =
               #{vo.contractId}
@@ -30,6 +31,7 @@
         select *
         from u_fixed_flow
         where is_deleted = 0
+          and is_meter != 1
           and project_id = #{vo.projectId}
           and contract_id =
               #{vo.contractId}

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

@@ -2952,7 +2952,7 @@ public class TaskController extends BladeController {
         Page<Map<String, Object>> resultMap = new Page<>();
         resultMap.setCurrent(dto.getCurrent());
         resultMap.setSize(dto.getSize());
-        resultMap.setTotal(jdbcTemplate.queryForObject("SELECT count(1) FROM u_fixed_flow WHERE is_deleted = 0 AND project_id = ? AND contract_id = ?", Long.class, dto.getProjectId(), dto.getContractId()));
+        resultMap.setTotal(jdbcTemplate.queryForObject("SELECT count(1) FROM u_fixed_flow WHERE is_deleted = 0 AND is_meter != 1 AND project_id = ? AND contract_id = ?", Long.class, dto.getProjectId(), dto.getContractId()));
         resultMap.setRecords(taskClient.getFixedFlowPage(dto));
         return R.data(resultMap);
     }