|
@@ -0,0 +1,54 @@
|
|
|
+package com.bizmatics.mhfire.controller.web;
|
|
|
+
|
|
|
+import com.bizmatics.common.core.bean.ApiResult;
|
|
|
+import com.bizmatics.common.core.bean.CommonPage;
|
|
|
+import com.bizmatics.mhfire.persistence.mapper.po.UnitPO;
|
|
|
+import com.bizmatics.mhfire.service.UnitService;
|
|
|
+import com.bizmatics.mhfire.service.vo.UnitAlCheckVO;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author yq
|
|
|
+ * @date 2021/5/28 17:44
|
|
|
+ * 单位信息
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/unit")
|
|
|
+public class UnitControllerWeb {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private UnitService unitService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取单个单位信息
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public ApiResult<UnitPO> getOne(UnitPO unitPo){
|
|
|
+ return ApiResult.success(unitService.getOne(unitPo));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页
|
|
|
+ * @param current
|
|
|
+ * @param size
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public ApiResult<CommonPage<UnitPO>> page(Integer current, Integer size){
|
|
|
+ return ApiResult.success(unitService.page(current,size));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单位信息及执法情况和历史检查记录
|
|
|
+ * @param unitId
|
|
|
+ * @param startTime
|
|
|
+ * @param endTime
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public ApiResult<UnitAlCheckVO> getUnitAlCheck(String unitId, String startTime, String endTime){
|
|
|
+ return ApiResult.success(unitService.getUnitAlCheck(unitId,startTime,endTime));
|
|
|
+ }
|
|
|
+}
|