From 1c74351afdec0db7e3afdb563d2fafd49f95631c Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期四, 05 六月 2025 14:20:29 +0800 Subject: [PATCH] 单节数量统计导出 --- src/main/java/com/whyc/service/BatttestdataInfService.java | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/whyc/service/BatttestdataInfService.java b/src/main/java/com/whyc/service/BatttestdataInfService.java index ac8a26e..2f24916 100644 --- a/src/main/java/com/whyc/service/BatttestdataInfService.java +++ b/src/main/java/com/whyc/service/BatttestdataInfService.java @@ -122,7 +122,7 @@ 3鐒跺悗鎵惧埌鍒ゆ柇浼樼锛屽姡鍖栵紝鎹熷潖鐨勫弬鏁帮紝寰楀埌缁撴灉銆� 4娴厖鐢靛帇鍥撅紝闇�瑕佹樉绀哄崟浣�+瀹炴椂鏁版嵁鐨勫崟浣撶數鍘嬶紝鍗曚綋鍐呴樆 */ - public Response getMonStatistic(MonStic stic) { + public Map getMonStatistic(MonStic stic) { Map<String,Object> map=new HashMap<>(); List<SticMonRes> goodlist=new ArrayList(); List<SticMonRes> badlist=new ArrayList(); @@ -151,7 +151,7 @@ List<BattInf> binfList=battInfService.getMonStatistic(stic); Float realCap=0f; if(binfList==null){ - return new Response().set(1,false,"褰撳墠鐢ㄦ埛鏈鐞嗘弧瓒虫潯浠剁殑鐢垫睜缁�"); + return map; } for (BattInf binf:binfList) { BatttestdataInf tinf =getLastStandardTestData(binf.getBattgroupId()); @@ -174,6 +174,8 @@ SticMonRes res=new SticMonRes(); res.setBattgroupId(binf.getBattgroupId()); res.setBattgroupName(binf.getBattgroupName()); + res.setStationName(binf.getStationName()); + res.setDevName(binf.getDevName()); res.setMonNum(data.getMonNum()); //鑾峰彇鍗曚綋鐨勫疄鏃舵暟鎹� BattRtdata rtdata=rtdataService.getRtdataByNum(binf.getBattgroupId(),data.getMonNum()); @@ -201,7 +203,8 @@ map.put("goodlistNum",goodlist.size()); map.put("badlistNum",badlist.size()); map.put("damagelistNum",damagelist.size()); - return new Response().setII(1,true,map,"鍗曡妭鏁伴噺缁熻"); + return map; + } //灏嗕笉婊¤冻鏉′欢鐨勭數姹犵粍鐨勬墍鏈夊崟浣撴斁鍏amage涓� private void setDamage(List damagelist, BattInf binf) { @@ -212,6 +215,8 @@ SticMonRes res=new SticMonRes(); res.setBattgroupId(binf.getBattgroupId()); res.setBattgroupName(binf.getBattgroupName()); + res.setStationName(binf.getStationName()); + res.setDevName(binf.getDevName()); res.setMonNum(i+1); res.setMonVol(0f); res.setMonRes(0f); @@ -222,6 +227,8 @@ SticMonRes res=new SticMonRes(); res.setBattgroupId(binf.getBattgroupId()); res.setBattgroupName(binf.getBattgroupName()); + res.setStationName(binf.getStationName()); + res.setDevName(binf.getDevName()); res.setMonNum(rtdata.getMonNum()); res.setMonVol(rtdata.getMonVol()); res.setMonRes(rtdata.getMonRes()); -- Gitblit v1.9.1