| | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.acid.ComActAcidRecordDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidCharts; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordTimeVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.FiveCount; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @ApiOperation(value = "分页查询",response = ComActAcidRecordVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody ComActAcidRecordDTO comActAcidRecordDTO) { |
| | | comActAcidRecordDTO.setUserId(this.getUserId()); |
| | | return this.communityService.selectAllComActAcidRecord(comActAcidRecordDTO); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActAcidRecordVO 实体对象 |
| | | * @param comActAcidRecord 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation(value = "新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActAcidRecordVO comActAcidRecordVO) { |
| | | public R insert(@RequestBody ComActAcidRecordTimeVO comActAcidRecord) { |
| | | ComActAcidRecordVO comActAcidRecordVO=new ComActAcidRecordVO(); |
| | | BeanUtils.copyProperties(comActAcidRecord,comActAcidRecordVO); |
| | | comActAcidRecordVO.setUserId(this.getUserId()); |
| | | comActAcidRecordVO.setCreateTime(new Date()); |
| | | return this.communityService.insertComActAcidRecord(comActAcidRecordVO); |
| | |
| | | @ApiOperation(value = "修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActAcidRecordVO comActAcidRecordVO) { |
| | | comActAcidRecordVO.setUserId(this.getUserId()); |
| | | return this.communityService.updateComActAcidRecord(comActAcidRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActAcidRecordVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation(value = "修改数据") |
| | | @PostMapping("/updateApplets") |
| | | public R updateApplets(@RequestBody ComActAcidRecordVO comActAcidRecordVO) { |
| | | comActAcidRecordVO.setUserId(this.getUserId()); |
| | | return this.communityService.updateApplets(comActAcidRecordVO); |
| | | } |
| | | /** |
| | | * 删除数据 |
| | | * |
| | |
| | | @ApiOperation(value = "7项常规统计",response = FiveCount.class) |
| | | @GetMapping("fiveCountPlus") |
| | | public R fiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity") String localCity){ |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,localCity); |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,localCity,null); |
| | | } |
| | | @ApiOperation(value = "新版查看详情",response = ComActAcidRecordVO.class) |
| | | @GetMapping("/detailByApp") |
| | | public R detailByApp(@RequestParam("id")Long id,@RequestParam("localCity")String localCity){ |
| | | return this.communityService.detailByApp(id,localCity); |
| | | } |
| | | |
| | | /** |
| | | * 图标统计 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "图标统计",response = ComActAcidCharts.class) |
| | | @GetMapping("charts") |
| | | public R charts(@RequestParam("date")String date,@RequestParam("localCity")String localCity){ |
| | | return this.communityService.charts(date,localCity); |
| | | } |
| | | } |