|
@@ -0,0 +1,57 @@
|
|
|
+package com.huimv.env.produce.controller;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.huimv.common.utils.Result;
|
|
|
+import com.huimv.common.utils.ResultCode;
|
|
|
+import com.huimv.env.produce.service.*;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.text.ParseException;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Project : huimv-env-platform
|
|
|
+ * @Package : ${}
|
|
|
+ * @Description : TODO
|
|
|
+ * @Version : 1.0
|
|
|
+ * @Author : ZhuoNing
|
|
|
+ * @Create : 2022/10/30
|
|
|
+ **/
|
|
|
+@RestController
|
|
|
+@RequestMapping("/v1.0.0/board")
|
|
|
+public class BoardController {
|
|
|
+ @Autowired
|
|
|
+ private WarningInfoService warningInfoService;
|
|
|
+ @Autowired
|
|
|
+ private TuppingService tuppingService;
|
|
|
+ @Autowired
|
|
|
+ private BirthService birthService;
|
|
|
+ @Autowired
|
|
|
+ private WeanService weanService;
|
|
|
+ @Autowired
|
|
|
+ private WorkplanService workplanService;
|
|
|
+ @Autowired
|
|
|
+ private TransferService transferService;
|
|
|
+ @Autowired
|
|
|
+ private GeneralImmunityPlanService generalImmunityPlanService;
|
|
|
+ @Autowired
|
|
|
+ private SpecialImmunityPlanService specialImmunityPlanService;
|
|
|
+
|
|
|
+ @PostMapping("/getBoardCount")
|
|
|
+ public Result getCount(@RequestBody Map<String, String> paramsMap) throws ParseException {
|
|
|
+ JSONObject resultJo = new JSONObject();
|
|
|
+ resultJo.put("warningCount",warningInfoService.getWarningCount(paramsMap));
|
|
|
+ resultJo.put("tuppingCount",tuppingService.getTuppingCount(paramsMap));
|
|
|
+ resultJo.put("birthCount",birthService.getBirthCount(paramsMap));
|
|
|
+ resultJo.put("weanCount",weanService.getWeanCount(paramsMap));
|
|
|
+ resultJo.put("workplanCount",workplanService.getWorkplanCount(paramsMap));
|
|
|
+ resultJo.put("transferCount",transferService.getTransferCount(paramsMap));
|
|
|
+ resultJo.put("generalImmunityCount",generalImmunityPlanService.getGeneralImmunityCount(paramsMap));
|
|
|
+ resultJo.put("specialImmunityCount",specialImmunityPlanService.getSpecialImmunityCount(paramsMap));
|
|
|
+ return new Result(ResultCode.SUCCESS,resultJo);
|
|
|
+ }
|
|
|
+}
|