From aeee1bf576b087a22da91641e3993d41cef4efb0 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Mon, 31 Jul 2023 08:38:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?#=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/operational/main/service/impl/WindHomeServiceImpl.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WindHomeServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WindHomeServiceImpl.java index cf2e745..55da5b5 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WindHomeServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WindHomeServiceImpl.java @@ -238,14 +238,7 @@ public class WindHomeServiceImpl implements WindHomeService { subordinate.setLgtd(station.getLgtd()); // 省市编码 String areaCode = station.getAreaCode(); - if (!StringUtil.isEmpty(areaCode)) { - String[] arrCode = areaCode.split(","); - subordinate.setAreaCode(arrCode[arrCode.length-1]); - R R = sysClient.getRegion(arrCode[1]); - if (R.isSuccess() && ObjectUtil.isNotEmpty(R.getData())) { - subordinate.setAreaName(R.getData().getName()); - } - } + subordinate.setAreaCode(areaCode); // 机构Id subordinate.setDepartId(entry.getKey().getId()); // 机构名称 From aa57627f4fd27520d70fed6cc36a42f74935ed17 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Mon, 31 Jul 2023 09:55:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?#=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WtSpWarehouseServiceImpl.java | 3 -- .../service/impl/AreaMonthReportServiceImpl.java | 43 ---------------------- 2 files changed, 46 deletions(-) diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpWarehouseServiceImpl.java b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpWarehouseServiceImpl.java index 5c5fd8d..7d83a40 100644 --- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpWarehouseServiceImpl.java +++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpWarehouseServiceImpl.java @@ -130,9 +130,6 @@ public class WtSpWarehouseServiceImpl extends BaseServiceImpl result = sysClient.getDeptName(entity.getAffiliatedUnit()); -// entity.setAffiliatedName(result.getData()); return super.save(entity); } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java index 298db4f..dd80fb7 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java @@ -203,49 +203,6 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { return R.data("success"); } - - public static void main(String[] args) { - HashMap map = new HashMap<>(); - List ticketList = new ArrayList<>(); - TicketConstants.TicketTypeNameEnum[] values = TicketConstants.TicketTypeNameEnum.values(); - TicketChartVo sum=new TicketChartVo(); - List sas = new ArrayList<>(); - sum.setDeptName("总计"); - for (TicketConstants.TicketTypeNameEnum value : values) { - TicketChartCell ticketChartCell = new TicketChartCell(); - ticketChartCell.setTicketType(value.getType()); - ticketChartCell.setTicketName(value.getFileName()); - Integer integer = Integer.valueOf(value.getType()); - ticketChartCell.setTicketMon(30+ integer); - BigDecimal d=BigDecimal.valueOf(integer).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_UP); - ticketChartCell.setTicketMonPerc(0.3+ d.doubleValue()); - sas.add(ticketChartCell); - } - sum.setChartCells(sas); - ticketList.add(sum); - //两票柱状图数据 - // 创建数据 - DefaultCategoryDataset dataset = new DefaultCategoryDataset(); - for (TicketChartVo chartVo : ticketList) { - for (int i = 0; i < chartVo.getChartCells().size(); i++) { - TicketChartCell ticketChartCell = chartVo.getChartCells().get(i); - dataset.addValue(ticketChartCell.getTicketMon(), ticketChartCell.getTicketName(), ticketChartCell.getTicketName()); - } - } - DefaultCategoryDataset datasetLine = new DefaultCategoryDataset(); - for (TicketChartVo chartVo : ticketList) { - for (int i = 0; i < chartVo.getChartCells().size(); i++) { - TicketChartCell ticketChartCell = chartVo.getChartCells().get(i); - datasetLine.addValue(ticketChartCell.getTicketMonPerc(), "合格率", ticketChartCell.getTicketName()); - } - } - String title="水电运维项目两票统计表"; - String domainAxis="数量"; - String rangeAxis="票据类型"; - ImageEntity ticketImage = JFreeUtil.iCreateBarLineChart(false, title, domainAxis, rangeAxis, dataset, datasetLine,662, 378); - map.put("ticketImage", ticketImage); - WordUtils.exportWord("template/waterMonV4.docx", "F:/", "888.docx", map); - } @Override public R exportHydropowerStationMonthReport(HttpServletResponse response, HashMap map, Integer year, Integer month, Integer date, Long deptId) { R deptNameR = sysClient.getDeptName(deptId);