|
|
@@ -0,0 +1,48 @@
|
|
|
+package com.lc.ibps.business.controller;
|
|
|
+
|
|
|
+import com.lc.ibps.api.base.constants.StateEnum;
|
|
|
+import com.lc.ibps.api.base.model.PartyEntity;
|
|
|
+import com.lc.ibps.api.base.model.User;
|
|
|
+import com.lc.ibps.base.core.util.AppUtil;
|
|
|
+import com.lc.ibps.base.core.util.I18nUtil;
|
|
|
+import com.lc.ibps.base.web.context.ContextUtil;
|
|
|
+import com.lc.ibps.business.service.FacilityEnvironmentService;
|
|
|
+import com.lc.ibps.cloud.entity.APIResult;
|
|
|
+import com.lc.ibps.cloud.provider.GenericProvider;
|
|
|
+import com.lc.ibps.org.api.IPartyPositionService;
|
|
|
+import com.lc.ibps.org.party.persistence.entity.PartyPositionPo;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.hibernate.validator.constraints.NotBlank;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+@Api(tags = "获取设施环境报表数据")
|
|
|
+@RequestMapping("/facs/report")
|
|
|
+@RestController
|
|
|
+public class FacilityEnvironmentController extends GenericProvider {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ FacilityEnvironmentService facilityEnvironmentService;
|
|
|
+
|
|
|
+ @ApiOperation("获取设施环境每日处理情况报表")
|
|
|
+ @GetMapping("/daily")
|
|
|
+ APIResult<List<Map<String, Object>>> getDailySummary(@RequestParam(name = "buMen", required = false) String buMen){
|
|
|
+ APIResult<List<Map<String, Object>>> result = new APIResult<>();
|
|
|
+ try {
|
|
|
+
|
|
|
+ List<Map<String, Object>> summary = facilityEnvironmentService.getDailySummary(buMen);
|
|
|
+ result.setData(summary);
|
|
|
+ } catch (Exception e) {
|
|
|
+ setExceptionResult(result, StateEnum.ILLEGAL_REQUEST.getCode(), I18nUtil.getMessage(StateEnum.ILLEGAL_REQUEST.getCode() + ""), e);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+}
|