From 40c628dbd5239699d9511f756506bd119e97dfbd Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 08 五月 2025 15:58:51 +0800
Subject: [PATCH] 最新版本541200007
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java | 93 ++++++++++++++++++++++++++++++++++++----------
1 files changed, 72 insertions(+), 21 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 717520d..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
@@ -647,6 +647,8 @@
}
/**
* 銆愭秷闃茬鎺с�戠湅鏉�-瀹炴椂鐩戞祴鏁版嵁
+ * 娑插帇鍥哄畾鍊硷細254001
+ * 姘村帇鍥哄畾鍊硷細253958
* @return
*
*/
@@ -665,6 +667,8 @@
BaseResponse<BaseListPageResponse<MonitorDataSearchResponse>> response = HKService.minitorDataSearch(param);
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.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();
@@ -672,7 +676,9 @@
for(MonitorDataSearchResponse model : r){
MonitorDataVO m = new MonitorDataVO();
m.setName(model.getName());
- m.setLevel(Constants.equalsInteger(model.getType(),60)?liquid:pressure);
+ m.setType(model.getType());
+// m.setLevel(Constants.equalsInteger(model.getType(),60)?liquid:pressure);
+ 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<>();
@@ -686,7 +692,6 @@
vm.setCateName(v.getMonitorSpecificName());
vm.setCateCode(v.getMonitorTypeKey());
vm.setTypeCode(v.getMonitorTypeCode());
- vm.setTypeName(v.getMonitorTypeName());
dataList.add(vm);
}
}else{
@@ -709,6 +714,46 @@
}
}
return list;
+ }
+
+ private String getLevelDataByDeviceName(MonitorDataVO m,String name,String unit) {
+
+ /**
+ * {
+ * "name":"娑�",
+ * "regionIndexCodes": [
+ * "root000000"
+ * ],
+ * "isSubRegion": true,
+ * "resourceType": "fireSensor",
+ * "pageNo": 1,
+ * "pageSize": 20,
+ * "orderBy": "name",
+ * "orderType": "desc"
+ * }
+ */
+ String r = "";
+
+ ResourcesByParamsRequest param = new ResourcesByParamsRequest();
+ param.setName(name);
+ param.setIsSubRegion(Boolean.TRUE);
+ param.setRegionIndexCodes(new String[]{"root000000"});
+ param.setResourceType("fireSensor");
+ param.setOrderType("desc");
+ param.setOrderBy("name");
+ param.setPageNo(1);
+ param.setPageSize(20);
+ BaseResponse<BaseListPageResponse<ResourcesByParamsResponse>> response = HKService.resourcesByParams(param);
+ if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)
+ && response.getData()!=null ) {
+ String min = response.getData().getList().get(0).getFireproChannelMinValue();
+ String max = response.getData().getList().get(0).getFireproChannelMaxvalue();
+ m.setMax(max);
+ m.setMin(min);
+ r =StringUtils.defaultString(min,"-")+"锝�"+StringUtils.defaultString(max,"-") +unit;
+ }
+ return r;
+
}
@@ -981,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(),
@@ -1180,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;
@@ -1200,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;
@@ -2734,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