Browse Source

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into develop

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
39529ee0b7
2 changed files with 5 additions and 21 deletions
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/RoadInformation.java
  2. +0
    -21
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionServiceImpl.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/RoadInformation.java View File

@@ -1,5 +1,6 @@
package com.tuoheng.admin.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.core.common.BaseEntity;
@@ -36,21 +37,25 @@ public class RoadInformation extends BaseEntity {
/**
* 起点经度
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String startLongitude;

/**
* 起点纬度
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String startLatitude;

/**
* 终点经度
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String endLongitude;

/**
* 终点纬度
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String endLatitude;

/**

+ 0
- 21
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionServiceImpl.java View File

@@ -77,12 +77,7 @@ public class InspectionServiceImpl implements IInspectionService {
.eq(Dept::getMark, 1));
//初始部门id
String deptIdInt = query.getDeptId();
//query.setDeptId("1");
//获取当前部门对应的巡检任务
// List<Inspection> inspectionList = inspectionMapper.selectList(Wrappers.<Inspection>lambdaQuery()
// .eq(StringUtils.isNotEmpty(query.getDeptId()), Inspection::getDeptId, query.getDeptId())
// .eq(Inspection::getMark, 1)
// .eq(Inspection::getTenantId,0));
//获取分页数据
IPage<Inspection> page = new Page<>(query.getPage(),query.getLimit());
IPage<InspectionInfoVo> pageDataVo = new Page<>(query.getPage(),query.getLimit());
@@ -112,20 +107,12 @@ public class InspectionServiceImpl implements IInspectionService {
.eq(StringUtils.isNotEmpty(x.getId()), InspectionFile::getInspectionId, x.getId())
.eq(InspectionFile::getTenantId, tenantId)
.eq(InspectionFile::getMark,1));
// if(StringUtils.isEmpty(inspectionFileList)){
// throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
// }
if(StringUtils.isNotEmpty(inspectionFileList)){
problemsVerifiedNum = inspectionFileList.size();
long count = inspectionFileList.stream().filter(t -> t.getStatus() == 15).count();
long count1 = inspectionFileList.stream().filter(t -> t.getStatus() == 20).count();
long count2 = inspectionFileList.stream().filter(t -> t.getStatus() == 25).count();
problemsFoundNum = (int) (count + count1 +count2);
// for (InspectionFile inspectionFile : inspectionFileList) {
// if (15 == inspectionFile.getStatus()) {
// problemsFoundNum += 1;
// }
// }
}
x.setFlag(0);
x.setProblemsFoundNum(problemsFoundNum);
@@ -158,20 +145,12 @@ public class InspectionServiceImpl implements IInspectionService {
.eq(StringUtils.isNotEmpty(x.getId()), InspectionFile::getInspectionId, x.getId())
.eq(InspectionFile::getTenantId, tenantId)
.eq(InspectionFile::getMark,1));
// if(StringUtils.isEmpty(inspectionFileList)){
// throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
// }
if(StringUtils.isNotEmpty(inspectionFileList)){
problemsVerifiedNum = inspectionFileList.size();
long count = inspectionFileList.stream().filter(t -> t.getStatus() == 15).count();
long count1 = inspectionFileList.stream().filter(t -> t.getStatus() == 20).count();
long count2 = inspectionFileList.stream().filter(t -> t.getStatus() == 25).count();
problemsFoundNum = (int) (count + count1 +count2);
// for (InspectionFile inspectionFile : inspectionFileList) {
// if (15 == inspectionFile.getStatus()) {
// problemsFoundNum += 1;
// }
// }
}
//获取任务deptId1:1为部门任务 0为子部门任务
if(deptIdInt.equals(deptId)){

Loading…
Cancel
Save