|
|
@@ -1,7 +1,10 @@
|
|
|
package cn.hnthyy.thmz.controller.bb;
|
|
|
|
|
|
+import cn.hnthyy.thmz.Utils.AssertUtil;
|
|
|
+import cn.hnthyy.thmz.Utils.R;
|
|
|
import cn.hnthyy.thmz.Utils.TokenUtil;
|
|
|
import cn.hnthyy.thmz.comment.UserLoginToken;
|
|
|
+import cn.hnthyy.thmz.entity.MzException;
|
|
|
import cn.hnthyy.thmz.entity.thmz.User;
|
|
|
import cn.hnthyy.thmz.service.his.bb.ReportStaticService;
|
|
|
import cn.hnthyy.thmz.vo.ReportVo;
|
|
|
@@ -34,26 +37,11 @@ public class ReportStaticController {
|
|
|
|
|
|
@UserLoginToken
|
|
|
@RequestMapping(value = "/selectDoctorIndexData", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
- public Map<String, Object> selectDoctorIndexData(@RequestBody ReportVo vo, HttpServletRequest httpServletRequest) {
|
|
|
- Map<String, Object> resultMap = new HashMap<>();
|
|
|
- try {
|
|
|
- if (StringUtils.isEmpty(vo.getReportId()) && vo.getReportIds() == null) {
|
|
|
- resultMap.put("code", -1);
|
|
|
- resultMap.put("message", "报表id为空,查询报表数据失败");
|
|
|
- return resultMap;
|
|
|
- }
|
|
|
+ public R selectDoctorIndexData(@RequestBody ReportVo vo, HttpServletRequest httpServletRequest){
|
|
|
+ AssertUtil.isNotBlank(vo.getReportId(),"报表id为空,查询报表数据失败");
|
|
|
User user = TokenUtil.getUser(httpServletRequest);
|
|
|
vo.setDoctorId(user.getUserIdCode());
|
|
|
Map<String, Object> map = reportStaticService.selectDoctorIndexData(vo);
|
|
|
- resultMap.put("code", 0);
|
|
|
- resultMap.put("message", "查询报表数据成功");
|
|
|
- resultMap.put("data", map);
|
|
|
- return resultMap;
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("查询报表数据,错误信息{}", e);
|
|
|
- resultMap.put("code", -1);
|
|
|
- resultMap.put("message", "查询报表数据失败");
|
|
|
- return resultMap;
|
|
|
+ return R.ok("查询报表数据成功").put("data",map);
|
|
|
}
|
|
|
- }
|
|
|
}
|