| | |
| | | import org.springblade.jfpt.alarm.wrapper.AlarmWrapper; |
| | | import org.springblade.jfpt.animalheat.service.AnimalHeatService; |
| | | import org.springblade.jfpt.healthcode.service.IhealthcodeService; |
| | | import org.springblade.jfpt.operation.entity.Operation; |
| | | import org.springblade.jfpt.operation.service.IOperationService; |
| | | import org.springblade.jfpt.operation.vo.OperationVO; |
| | | import org.springblade.jfpt.parcel.service.ParcelService; |
| | | import org.springblade.jfpt.parcel.util.DateUtils; |
| | | import org.springblade.jfpt.parcel.vo.ConditionVo; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | private final IAlarmService alarmService; |
| | | |
| | | private final AnimalHeatService animalHeatService; |
| | | |
| | | private final IOperationService operationService; |
| | | |
| | | private IhealthcodeService ihealthcodeService; |
| | | |
| | |
| | | if (alarm.getAlarmTime() != null && alarm.getAlarmTime().equals("")){ |
| | | alarm.setAlarmTime(null); |
| | | } |
| | | return R.status(alarmService.saveOrUpdate(alarm)); |
| | | if (alarm.getCid() != null && alarm.getCid().equals("")){ |
| | | alarm.setCid("0"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | return null; |
| | | //return R.status(alarmService.saveOrUpdate(alarm)); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 一周警情统计 2021-3-16 arsn |
| | | * 主动报警统计 饼图展示 |
| | | * @param response |
| | | * @param conditionVo status 0:本日 1:本月 2:本月 |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectAlarmSum") |
| | | public R selectAlarmSum(HttpServletResponse response, ConditionVo conditionVo) { |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials","true"); |
| | | //返回数据 |
| | | return R.data(alarmService.selectAlarmSum(conditionVo)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 一周警情统计(主动报警+被动报警类型(体温异常,红码,违禁品)) 2021-3-16 arsn 柱状图展示 |
| | | * @param response |
| | | * @return |
| | | */ |
| | |
| | | types = Arrays.asList(type); |
| | | //获取时间集合数据(今天及今天之前6天的日期) |
| | | times = DateUtils.pastDay(new SimpleDateFormat("yyyy-MM-dd").format(new Date())); |
| | | //1.统计7天内一键求助警情数量数据 |
| | | //1.统计7天内一键求助警情数量数据 3-20 修改展示紧急求助 |
| | | Map<String,Object> alarmData = alarmService.selectAlarmData(); |
| | | alarmData.put("name","一键求助"); |
| | | //2.统计7天内违禁品的数量数据 |
| | |
| | | |
| | | |
| | | /** |
| | | * 修改警情类型 |
| | | * 修改警情类型/同时修改人员状态 |
| | | */ |
| | | @PostMapping("/updateJtype") |
| | | public R updateJtype(String id, String czTime, String bz, HttpServletResponse response) { |
| | | public R updateJtype(OperationVO operation, HttpServletResponse response) { |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials","true"); |
| | | alarmService.updateJtype(id,czTime,bz); |
| | | alarmService.updateJtype(operation.getJid(),operation.getJtype(),operation.getBz(),operation.getZctime()); |
| | | alarmService.updatePoliceStatus(operation.getRid(),"0"); |
| | | operationService.save(operation); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | | |
| | | } |