Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
Jone 1 year ago
parent
commit
9336fa3ca5
  1. 3
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpWarehouseServiceImpl.java
  2. 43
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java
  3. 9
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WindHomeServiceImpl.java

3
hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpWarehouseServiceImpl.java

@ -130,9 +130,6 @@ public class WtSpWarehouseServiceImpl extends BaseServiceImpl<WtSpWarehouseMappe
if(StringUtils.isEmpty(entity.getCode())){
throw new ServiceException("仓库编码不能为空");
}
entity.setManager(AuthUtil.getUserId());
// R<String> result = sysClient.getDeptName(entity.getAffiliatedUnit());
// entity.setAffiliatedName(result.getData());
return super.save(entity);
}
}

43
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<String, Object> map = new HashMap<>();
List<TicketChartVo> ticketList = new ArrayList<>();
TicketConstants.TicketTypeNameEnum[] values = TicketConstants.TicketTypeNameEnum.values();
TicketChartVo sum=new TicketChartVo();
List<TicketChartCell> 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<String, Object> map, Integer year, Integer month, Integer date, Long deptId) {
R<String> deptNameR = sysClient.getDeptName(deptId);

9
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<Region> 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());
// 机构名称

Loading…
Cancel
Save