From eef6d2bcdb29348efe4ef17bc45a4c6886b487b1 Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期四, 11 七月 2024 18:16:26 +0800 Subject: [PATCH] 花城 【小程序】统计排行添加是否是问题清单标识5 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java index ca3aaf0..b1c6dd4 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java @@ -1145,7 +1145,7 @@ serviceStaticDTO.getYear(), serviceStaticDTO.getServiceType()); - if(serviceStaticDTO.getServiceType()==1 || serviceStaticDTO.getServiceType()==null) + if(serviceStaticDTO.getServiceType()==null || serviceStaticDTO.getServiceType()==1) { List<NewFightNeedProblemClaim> list=baseMapper.getNewServiceNum("",serviceStaticDTO.getCheckUnitId()+""); if(list.size()>0) @@ -1163,21 +1163,23 @@ String Ltime=item.getServiceTime(); if(!StringUtils.isEmpty(Ltime)) { - double time=(double)(Long.valueOf(Ltime)/3600000); - hours=hours+(time); - - DecimalFormat df = new DecimalFormat("#.00"); + double time=(Double.valueOf(Ltime)/3600000); + DecimalFormat df = new DecimalFormat("#.##"); String formattedNumber = df.format(time); double result = Double.parseDouble(formattedNumber); + + hours=hours+result; + newItem.setServiceTime(result); item.setServiceTime(result+""); } + newItem.setIsNew("2"); newItem.setServiceId(Long.valueOf(item.getTaskId())); newItem.setServiceType(1); newItem.setServiceAt(item.getCreationTime()); serviceDetailStaticsVOList.add(newItem); } - DecimalFormat df = new DecimalFormat("#.00"); + DecimalFormat df = new DecimalFormat("#.##"); String formattedNumber = df.format(hours); double result = Double.parseDouble(formattedNumber); serviceStaticsVO.setHours(result); @@ -1201,7 +1203,7 @@ serviceStaticDTO.getYear(), serviceStaticDTO.getServiceType()); - if(serviceStaticDTO.getServiceType()==1 || serviceStaticDTO.getServiceType()==null) + if(serviceStaticDTO.getServiceType()==null || serviceStaticDTO.getServiceType()==1) { //获取新需求服务列表 List<NewFightNeedProblemClaim> list=baseMapper.getNewServiceNum(serviceStaticDTO.getPhone(),""); @@ -1220,22 +1222,24 @@ String Ltime=item.getServiceTime(); if(!StringUtils.isEmpty(Ltime)) { - double time=(double)(Long.valueOf(Ltime)/3600000); - - hours=hours+(time); - DecimalFormat df = new DecimalFormat("#.00"); + double time=(Double.valueOf(Ltime)/3600000); + DecimalFormat df = new DecimalFormat("#.##"); String formattedNumber = df.format(time); double result = Double.parseDouble(formattedNumber); + + hours=hours+result; + newItem.setServiceTime(result); item.setServiceTime(result+""); } + newItem.setIsNew("2"); newItem.setServiceId(Long.valueOf(item.getTaskId())); newItem.setServiceType(1); newItem.setServiceAt(item.getCreationTime()); serviceDetailStaticsVOList.add(newItem); } - DecimalFormat df = new DecimalFormat("#.00"); + DecimalFormat df = new DecimalFormat("#.##"); String formattedNumber = df.format(hours); double result = Double.parseDouble(formattedNumber); serviceStaticsVO.setHours(result); -- Gitblit v1.7.1