Commit 32d60e69 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register_to_0715' of…

Merge branch 'develop_tzs_register_to_0715' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register_to_0715
parents 67d3f1ae 44985717
...@@ -14,5 +14,5 @@ public interface AlertStatisticsMapper extends BaseMapper<AlertStatistics> { ...@@ -14,5 +14,5 @@ public interface AlertStatisticsMapper extends BaseMapper<AlertStatistics> {
AlertStatistics getStatisticsMessage(@Param("orgCode")String orgCode, @Param("startDate")String startDate , @Param("endDate")String endDate); AlertStatistics getStatisticsMessage(@Param("orgCode")String orgCode, @Param("startDate")String startDate , @Param("endDate")String endDate);
AlertStatistics statisticsInfoByRegionAndDate(@Param("regionCode")String regionCode, @Param("startDate")String startDate , @Param("endDate")String endDate); AlertStatistics statisticsInfoByRegionAndDate(@Param("regionCode")Integer regionCode, @Param("startDate")String startDate , @Param("endDate")String endDate);
} }
...@@ -5,8 +5,8 @@ import com.alibaba.fastjson.JSONArray; ...@@ -5,8 +5,8 @@ import com.alibaba.fastjson.JSONArray;
import com.yeejoin.amos.boot.module.elevator.api.entity.AlertStatistics; import com.yeejoin.amos.boot.module.elevator.api.entity.AlertStatistics;
import java.text.ParseException; import java.text.ParseException;
import java.time.LocalDate;
import java.util.List; import java.util.List;
import java.util.Map;
public interface IAlertStatisticsService { public interface IAlertStatisticsService {
...@@ -14,5 +14,5 @@ public interface IAlertStatisticsService { ...@@ -14,5 +14,5 @@ public interface IAlertStatisticsService {
List<AlertStatistics> getList(String date) throws ParseException; List<AlertStatistics> getList(String date) throws ParseException;
JSONArray statisticInfoByRegionAndDate(String regionCode, LocalDate startDate, LocalDate endDate); JSONArray statisticInfoByRegionAndDate(Map<String, Object> queryParams);
} }
...@@ -12,10 +12,7 @@ import io.swagger.annotations.Api; ...@@ -12,10 +12,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...@@ -24,11 +21,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel; ...@@ -24,11 +21,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.util.*;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@RestController @RestController
...@@ -350,9 +343,9 @@ public class StatisticsController extends BaseController { ...@@ -350,9 +343,9 @@ public class StatisticsController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/region/info") @PostMapping (value = "/region/info")
@ApiOperation(httpMethod = "GET", value = "查询区域统计信息", notes = "查询区域统计信息") @ApiOperation(httpMethod = "POST", value = "查询区域统计信息", notes = "查询区域统计信息")
public ResponseModel<JSONArray> statisticsRegionInfo(@RequestParam(value = "cityCode") String regionCode, @RequestParam(value = "startDate", required = false) LocalDate startDate, @RequestParam(value = "endDate", required = false) LocalDate endDate) { public ResponseModel<JSONArray> statisticsRegionInfo(@RequestBody Map<String, Object> queryParams) {
return ResponseHelper.buildResponse(alertStatisticsService.statisticInfoByRegionAndDate(regionCode, startDate, endDate)); return ResponseHelper.buildResponse(alertStatisticsService.statisticInfoByRegionAndDate(queryParams));
} }
} }
...@@ -165,9 +165,12 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto, ...@@ -165,9 +165,12 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto,
} }
@Override @Override
public JSONArray statisticInfoByRegionAndDate(String regionCode, LocalDate startDate, LocalDate endDate) { public JSONArray statisticInfoByRegionAndDate(Map<String, Object> params) {
LocalDate today = LocalDate.now(); LocalDate today = LocalDate.now();
if (ObjectUtils.isEmpty(startDate) || ObjectUtils.isEmpty(endDate)) { LocalDate startDate = (LocalDate) params.get("startDate");
LocalDate endDate = (LocalDate) params.get("endDate");
Integer regionCode = (Integer) params.get("cityCode");
if (ObjectUtils.isEmpty(params.get("startDate")) || ObjectUtils.isEmpty(params.get("endDate"))) {
startDate = today.minusDays(6); startDate = today.minusDays(6);
endDate = today; endDate = today;
} }
......
...@@ -13,7 +13,6 @@ import io.swagger.annotations.Api; ...@@ -13,7 +13,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -124,7 +123,6 @@ public class IdxBizJqEquipmentRegisterController extends BaseController { ...@@ -124,7 +123,6 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), null, null)); return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), null, null));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equ-category/listByPersonAndEquList") @GetMapping(value = "/equ-category/listByPersonAndEquList")
@ApiOperation(httpMethod = "GET", value = "按照人员身份、设备种类查询设备类别", notes = "按照人员身份、设备种类查询设备类别") @ApiOperation(httpMethod = "GET", value = "按照人员身份、设备种类查询设备类别", notes = "按照人员身份、设备种类查询设备类别")
...@@ -167,7 +165,7 @@ public class IdxBizJqEquipmentRegisterController extends BaseController { ...@@ -167,7 +165,7 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/importData") @PostMapping(value = "/importData")
@ApiOperation(httpMethod = "POST", value = "气瓶批量导入", notes = "气瓶批量导入") @ApiOperation(httpMethod = "POST", value = "气瓶批量导入", notes = "气瓶批量导入")
public List<EquipInfoCylinderExcelDto> ImportData (@RequestPart MultipartFile multipartFile) throws Exception { public List<EquipInfoCylinderExcelDto> ImportData (@RequestPart("file") MultipartFile multipartFile) throws Exception {
List<EquipInfoCylinderExcelDto> aircraftList = new ArrayList<>(); List<EquipInfoCylinderExcelDto> aircraftList = new ArrayList<>();
try { try {
EasyExcel.read(multipartFile.getInputStream(), EquipInfoCylinderExcelDto.class, new AnalysisEventListener<EquipInfoCylinderExcelDto>() { EasyExcel.read(multipartFile.getInputStream(), EquipInfoCylinderExcelDto.class, new AnalysisEventListener<EquipInfoCylinderExcelDto>() {
......
package com.yeejoin.amos.boot.module.ymt.biz.dao; package com.yeejoin.amos.boot.module.ymt.biz.dao;
import com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto; import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
......
...@@ -10,7 +10,7 @@ import com.google.common.collect.Lists; ...@@ -10,7 +10,7 @@ import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto; import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipExportDto; import com.yeejoin.amos.boot.module.ymt.api.dto.EquipExportDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto; import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentMessageDto; import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentMessageDto;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment