|
|
@ -22,7 +22,12 @@ import com.kms.yxgh.df.domain.DfCheckingProblemV2; |
|
|
|
import com.kms.yxgh.df.domain.DfDangerousTask; |
|
|
|
import com.kms.yxgh.df.domain.DfDangerousTaskItemRel; |
|
|
|
import com.kms.yxgh.df.domain.DfYhV2; |
|
|
|
import com.kms.yxgh.df.mapper.*; |
|
|
|
import com.kms.yxgh.df.mapper.DfCheckingProblemV2Mapper; |
|
|
|
import com.kms.yxgh.df.mapper.DfCheckingRecordV2Mapper; |
|
|
|
import com.kms.yxgh.df.mapper.DfCheckingV2Mapper; |
|
|
|
import com.kms.yxgh.df.mapper.DfDangerousTaskItemRelMapper; |
|
|
|
import com.kms.yxgh.df.mapper.DfDangerousTaskMapper; |
|
|
|
import com.kms.yxgh.df.mapper.DfYhV2Mapper; |
|
|
|
import com.kms.yxgh.df.service.DfCheckingProblemV2Service; |
|
|
|
import com.kms.yxgh.df.service.DfDangerousTaskItemRelService; |
|
|
|
import com.kms.yxgh.df.service.DfDangerousTaskService; |
|
|
@ -643,9 +648,11 @@ public enum StaticIndexEnum { |
|
|
|
DfYhV2Service dfYhV2Service = SpringUtils.getBean(DfYhV2Service.class); |
|
|
|
SzYhV2Service szYhV2Service = SpringUtils.getBean(SzYhV2Service.class); |
|
|
|
int dfCount = dfYhV2Service.count(new LambdaQueryWrapper<DfYhV2>() |
|
|
|
.eq(DfYhV2::getStatus, DfYhV2StatusEnum.ACCEPTED.getValue()) |
|
|
|
.ge(!Objects.isNull(sp.getStartTime()), DfYhV2::getCreateTime, sp.getStartTime()) |
|
|
|
.le(!Objects.isNull(sp.getStartTime()), DfYhV2::getCreateTime, sp.getEndTime())); |
|
|
|
int szCount = szYhV2Service.count(new LambdaQueryWrapper<SzYhV2>() |
|
|
|
.eq(SzYhV2::getStatus, DfYhV2StatusEnum.ACCEPTED.getValue()) |
|
|
|
.ge(!Objects.isNull(sp.getStartTime()), SzYhV2::getCreateTime, sp.getStartTime()) |
|
|
|
.le(!Objects.isNull(sp.getStartTime()), SzYhV2::getCreateTime, sp.getEndTime())); |
|
|
|
|
|
|
@ -658,12 +665,30 @@ public enum StaticIndexEnum { |
|
|
|
BigDecimal qxCount = BigDecimal.valueOf(dfCount + szCount); |
|
|
|
BigDecimal yhCount = BigDecimal.valueOf(yb+jd+zd+lx); |
|
|
|
if (yhCount.longValue()!=0 && qxCount.longValue()!=0){ |
|
|
|
BigDecimal divide = yhCount.divide(qxCount,20, BigDecimal.ROUND_HALF_UP); |
|
|
|
bl = divide.multiply(BigDecimal.valueOf(100)); |
|
|
|
if (qxCount.longValue() >= yhCount.longValue()) { |
|
|
|
BigDecimal divide = yhCount.divide(qxCount, 20, BigDecimal.ROUND_HALF_UP); |
|
|
|
bl = divide.multiply(BigDecimal.valueOf(100)); |
|
|
|
} |
|
|
|
} |
|
|
|
return String.valueOf(bl.longValue()); |
|
|
|
} |
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
int yb = 0; |
|
|
|
int jd = 0; |
|
|
|
int zd = 0; |
|
|
|
int lx = 3; |
|
|
|
|
|
|
|
BigDecimal bl = BigDecimal.valueOf(0); |
|
|
|
BigDecimal qxCount = BigDecimal.valueOf(3); |
|
|
|
BigDecimal yhCount = BigDecimal.valueOf(yb + jd + zd + lx); |
|
|
|
if (yhCount.longValue() != 0 && qxCount.longValue() != 0) { |
|
|
|
BigDecimal divide = yhCount.divide(qxCount, 20, BigDecimal.ROUND_HALF_UP); |
|
|
|
bl = divide.multiply(BigDecimal.valueOf(100)); |
|
|
|
} |
|
|
|
System.out.println(String.valueOf(bl.longValue())); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static Map<String, String> dataGroup(List<CountDateDto> list) { |
|
|
|
if (CollectionUtil.isEmpty(list) && list.isEmpty()) { |
|
|
|