From ffa54cddadb29a265869573abb0c1067fcd74b96 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 09 五月 2025 16:14:03 +0800
Subject: [PATCH] 提交
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java | 55 ++++++++++++++++++++++++++++++++-----------------------
1 files changed, 32 insertions(+), 23 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
index a87f967..126b630 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -668,7 +668,7 @@
String pressure = systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.WMS_PRESSURE_LEVEL).getCode();
String liquid = systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.WMS_LIQUID_LEVEL).getCode();
String pressureUnit = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.PRESSURE_LEVEL_UNIT).getCode();
- String liquidUnit = systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.LIQUID_LEVEL_UNIT).getCode();
+ String liquidUnit = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.LIQUID_LEVEL_UNIT).getCode();
if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)
&& response.getData()!=null ) {
List<MonitorDataSearchResponse> r = response.getData().getList();
@@ -676,8 +676,9 @@
for(MonitorDataSearchResponse model : r){
MonitorDataVO m = new MonitorDataVO();
m.setName(model.getName());
+ m.setType(model.getType());
// m.setLevel(Constants.equalsInteger(model.getType(),60)?liquid:pressure);
- m.setLevel(getLevelDataByDeviceName(model.getName(),Constants.equalsInteger(model.getType(),60)?liquidUnit:pressureUnit));
+ m.setLevel(getLevelDataByDeviceName(m,model.getName(),Constants.equalsInteger(model.getType(),60)?liquidUnit:pressureUnit));
m.setDataList(new ArrayList<>());
if(model.getValues()!=null){
List<MonitorDataInfoVO> dataList = new ArrayList<>();
@@ -715,7 +716,7 @@
return list;
}
- private String getLevelDataByDeviceName(String name,String unit) {
+ private String getLevelDataByDeviceName(MonitorDataVO m,String name,String unit) {
/**
* {
@@ -747,7 +748,9 @@
&& response.getData()!=null ) {
String min = response.getData().getList().get(0).getFireproChannelMinValue();
String max = response.getData().getList().get(0).getFireproChannelMaxvalue();
- r =StringUtils.defaultString(min,"-")+"~"+StringUtils.defaultString(max,"-") +unit;
+ m.setMax(max);
+ m.setMin(min);
+ r =StringUtils.defaultString(min,"-")+"锝�"+StringUtils.defaultString(max,"-") +unit;
}
return r;
@@ -1023,10 +1026,11 @@
Date lastYear = DateUtil.addYearToDate(year,-1);//鍘诲勾
List<PlatformJob> monthNum = platformJobMapper.selectJoinList(PlatformJob.class,
new MPJLambdaWrapper<PlatformJob>()
- .selectAs(PlatformJob::getId,PlatformJob::getId)
- .select(PlatformJob::getType,PlatformJob::getType)
- .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
- .select(PlatformJob::getStatus,PlatformJob::getStatus)
+ .selectAs(PlatformJob::getId,PlatformJob::getId)
+ .selectAs(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
+ .selectAs(PlatformJob::getDoneDate,PlatformJob::getDoneDate)
+ .select(PlatformJob::getStatus,PlatformJob::getStatus)
+ .select(PlatformJob::getType,PlatformJob::getType)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.in(PlatformJob::getType,Constants.ONE,Constants.THREE)
.in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),
@@ -1222,15 +1226,19 @@
}
if(CollectionUtils.isNotEmpty(jobList)){
//鑾峰彇浠诲姟鏁版嵁
- List<String> jobDataList = list.stream().filter(i->Objects.nonNull(i.getDoneDate())).map(i->DateUtil.formatDate(i.getDoneDate(),"yyyy-MM-dd")).collect(Collectors.toList());
- for (String jobDate:jobDataList) {
- //杩囨护褰撳ぉ鐨勬暟鎹�
- List<PlatformJob> platformJobList = list.stream().
- filter(i->jobDate.equals(DateUtil.formatDate(i.getDoneDate(),"yyyy-MM-dd"))).collect(Collectors.toList());
- if(CollectionUtils.isNotEmpty(platformJobList)){
- //鑾峰彇浠婂ぉ鐨�
- r = r.add(this.getDayTotalRata(getSumTotalByList(platformJobList,type,null),jobDate));
+ List<String> jobDataList = jobList.stream().filter(i->Objects.nonNull(i.getDoneDate()))
+ .map(i->DateUtil.formatDate(i.getDoneDate(),"yyyy-MM-dd")).collect(Collectors.toList());
+ if(CollectionUtils.isNotEmpty(jobDataList)){
+ for (String jobDate:jobDataList) {
+ //杩囨护褰撳ぉ鐨勬暟鎹�
+ List<PlatformJob> platformJobList = list.stream().
+ filter(i->jobDate.equals(DateUtil.formatDate(i.getDoneDate(),"yyyy-MM-dd"))).collect(Collectors.toList());
+ if(CollectionUtils.isNotEmpty(platformJobList)){
+ //鑾峰彇浠婂ぉ鐨�
+ r = r.add(this.getDayTotalRata(getSumTotalByList(platformJobList,type,null),jobDate));
+ }
}
+ r = r.divide(new BigDecimal(Integer.toString(jobList.size())),2,BigDecimal.ROUND_HALF_UP);
}
}
return r;
@@ -1242,7 +1250,7 @@
//鏌ヨ浠婃棩鏈�鏃�/鏈�鏅氱殑浣滀笟鏁版嵁
List<PlatformLog> platformLogList = platformLogMapper.selectList(new QueryWrapper<PlatformLog>()
.lambda()
- .apply(" ( to_days(param1) = '"+today+"' or to_days(param2) = '"+today+"' ) ")
+ .apply(" ( DATE_FORMAT( param1 ,'%Y-%m-%d' ) = '"+today+"' or DATE_FORMAT( param2 ,'%Y-%m-%d' ) = '"+today+"' ) ")
);
if(totalAmount.compareTo(BigDecimal.ZERO)==0||CollectionUtils.isEmpty(platformLogList)){
return BigDecimal.ZERO;
@@ -2776,17 +2784,18 @@
t =new WholeProvinceMapVO();
t.setMonthNum( Constants.formatBigdecimal0Float(model.getMonthOutboundQuantity()));
t.setYearNum( Constants.formatBigdecimal0Float(model.getYearOutboundQuantity()));
-
- if(Constants.UNIT_TYPE == 1) {
- //澶勭悊鍗曚綅鎴愨�滅鈥濓紝涓�绠�=5涓囨敮
- t.setMonthNum(Constants.formatBigdecimal(t.getMonthNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP));
- t.setYearNum(Constants.formatBigdecimal(t.getYearNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP));
- }
t.setProvinceCode(model.getToProvinceCode());
t.setProvinceName(model.getToProvinceName());
result.add(t);
}
}
+ if(Constants.UNIT_TYPE == 1) {
+ for(WholeProvinceMapVO t : result){
+ //澶勭悊鍗曚綅鎴愨�滅鈥濓紝涓�绠�=5涓囨敮
+ t.setMonthNum(Constants.formatBigdecimal(t.getMonthNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP));
+ t.setYearNum(Constants.formatBigdecimal(t.getYearNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP));
+ }
+ }
}
return result;
}
--
Gitblit v1.9.3