Merge remote-tracking branch 'origin/test' into test
| | |
| | | package com.panzhihua.common.model.dtos; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author xyh |
| | |
| | | @ApiModel("id参数") |
| | | public class IdDTO { |
| | | |
| | | @NotNull(message = "id不能为空") |
| | | @ApiModelProperty("id") |
| | | private String id; |
| | | |
| | | public String getId() { |
| | |
| | | private Integer eventStatus; |
| | | |
| | | @ApiModelProperty("人员标签") |
| | | private Integer tag; |
| | | private String tag; |
| | | |
| | | @ApiModelProperty("是否异常") |
| | | private Integer isExp; |
| | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("人员标签") |
| | | private Integer tag; |
| | | private String tag; |
| | | |
| | | @ApiModelProperty("性别") |
| | | private Integer sex; |
| | |
| | | /** |
| | | * 撤销走访 |
| | | * |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/cancel/{id}") |
| | | R cancel(@PathVariable("id") Long id); |
| | | @PostMapping("/eventvisitingtasks/cancel") |
| | | R cancel(@RequestBody IdDTO idDTO); |
| | | |
| | | /** |
| | | * 恢复走访 |
| | | * |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/reset/{id}") |
| | | R reset(@PathVariable("id") Long id); |
| | | @PostMapping("/eventvisitingtasks/reset") |
| | | R reset(@RequestBody IdDTO idDTO); |
| | | |
| | | /** |
| | | * 新增走访 |
| | | * |
| | | * @param ids |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.IdDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksAddDTO; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | | import com.panzhihua.common.model.query.visit.EventVisitListQuery; |
| | | import com.panzhihua.common.model.vos.IPageVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.visit.*; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.Date; |
| | |
| | | */ |
| | | @PostMapping("/delete") |
| | | @ApiOperation(value = "删除走访任务") |
| | | public R delete(@RequestBody IdDTO idDTO){ |
| | | public R delete(@RequestBody @Valid IdDTO idDTO){ |
| | | return gridService.delete(idDTO,this.getCommunityId()); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "新增走访任务") |
| | | public R add(@RequestBody IdDTO idDTO){ |
| | | public R add(@RequestBody @Valid IdDTO idDTO){ |
| | | return gridService.addVisitingTask(idDTO,this.getCommunityId(),this.getUserId()); |
| | | } |
| | | |
| | | /** |
| | | * 撤销走访任务 |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/cancel") |
| | | @ApiOperation(value = "撤销走访任务") |
| | | public R cancel(@RequestParam("id") Long id){ |
| | | return gridService.cancel(id); |
| | | public R cancel(@RequestBody @Valid IdDTO idDTO){ |
| | | return gridService.cancel(idDTO); |
| | | } |
| | | |
| | | /** |
| | | * 恢复走访任务 |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/reset") |
| | | @ApiOperation(value = "新增走访任务") |
| | | public R reset(@RequestParam("id") Long id){ |
| | | return gridService.reset(id); |
| | | public R reset(@RequestBody @Valid IdDTO idDTO){ |
| | | return gridService.reset(idDTO); |
| | | } |
| | | |
| | | |
| | |
| | | populationHouseDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationHouseDO.setAlley(vo.getRoad()); |
| | | populationHouseDO.setHouseNum(vo.getDoorNo()); |
| | | populationHouseDO.setCode(vo.getDoorNo()); |
| | | populationHouseDO.setStatus(vo.getIsRent()); |
| | | populationHouseDO.setCommunityId(communityId); |
| | | populationHouseDO.setFloor(vo.getFloor()); |
| | | populationHouseDO.setUnitNo(vo.getUnitNo()); |
| | | populationHouseDO.setHouseNo(vo.getHouseNo()); |
| | | populationHouseDO.setCode(vo.getHouseNo()); |
| | | populationHouseDO.setAddress(address); |
| | | populationHouseDO.setUpdateAt(new Date()); |
| | | populationHouseDO.setConstructPurpose(vo.getBuildPurpose()); |
| | |
| | | |
| | | /** |
| | | * 撤销走访 |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/cancel/{id}") |
| | | R cancel(@PathVariable("id") Long id){ |
| | | return eventVisitingTasksService.cancel(id); |
| | | @PostMapping("/cancel") |
| | | R cancel(@RequestBody IdDTO idDTO){ |
| | | return eventVisitingTasksService.cancel(idDTO); |
| | | } |
| | | |
| | | /** |
| | | * 恢复 |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/reset/{id}") |
| | | R reset(@PathVariable("id") Long id){ |
| | | return eventVisitingTasksService.reset(id); |
| | | @PostMapping("/reset") |
| | | R reset(@RequestBody IdDTO idDTO){ |
| | | return eventVisitingTasksService.reset(idDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 撤销 |
| | | * |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | R cancel(Long id); |
| | | R cancel(IdDTO idDTO); |
| | | |
| | | /** |
| | | * 恢复 |
| | | * |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | R reset(Long id); |
| | | R reset(IdDTO idDTO); |
| | | |
| | | /** |
| | | * 开始 |
| | |
| | | public R getNearByGrid(PageEventGridNearbyDTO pageEventGridNearbyDTO) { |
| | | Page page = new Page(pageEventGridNearbyDTO.getPageNum(), pageEventGridNearbyDTO.getPageSize()); |
| | | String latLng = pageEventGridNearbyDTO.getHappentLatLng(); |
| | | if(!latLng.matches("^[\\-\\+]?(0(\\.\\d{1,10})?|([1-9](\\d)?)(\\.\\d{1,10})?|1[0-7]\\d{1}(\\.\\d{1,10})?|180\\.0{1,10}),[\\-\\+]?((0|([1-8]\\d?))(\\.\\d{1,10})?|90(\\.0{1,10})?)$")){ |
| | | // if(!latLng.matches("^[\\-\\+]?(0(\\.\\d{1,10})?|([1-9](\\d)?)(\\.\\d{1,10})?|1[0-7]\\d{1}(\\.\\d{1,10})?|180\\.0{1,10}),[\\-\\+]?((0|([1-8]\\d?))(\\.\\d{1,10})?|90(\\.0{1,10})?)$")){ |
| | | // return R.fail("经纬度参数错误"); |
| | | // } |
| | | if(!latLng.matches("[1-9][0-9](\\.[0-9]{1,6})?,[1-9][0-9]{2}(\\.[0-9]{1,6})?")){ |
| | | return R.fail("经纬度参数错误"); |
| | | } |
| | | String latLngArr[] = latLng.split(","); |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | EventServiceImpl service = new EventServiceImpl(); |
| | | List<EventWorkVO> list = service.listHalfYearByDyn(); |
| | | System.out.println(list); |
| | | String content = "30,104"; |
| | | String re = "[1-9][0-9](\\.[0-9]{1,6})?,[1-9][0-9]{2}(\\.[0-9]{1,6})?"; |
| | | |
| | | System.out.println(content.matches(re)); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public R cancel(Long id) { |
| | | public R cancel(IdDTO idDTO) { |
| | | |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(id); |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(Long.valueOf(idDTO.getId())); |
| | | if(eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.DZF.getCode()){ |
| | | return R.fail("当前状态不可撤销"); |
| | | } |
| | | int rt = eventVisitingTasksMapper.cancel(id,EventTasksStatusEnum.YCX.getCode()); |
| | | int rt = eventVisitingTasksMapper.cancel(eventVisitingTasksDO.getId(),EventTasksStatusEnum.YCX.getCode()); |
| | | if(rt > 0){ |
| | | return R.ok(); |
| | | } |
| | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public R reset(Long id) { |
| | | public R reset(IdDTO idDTO) { |
| | | |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(id); |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(Long.valueOf(idDTO.getId())); |
| | | if(eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.YCX.getCode()){ |
| | | return R.fail("当前状态不可恢复"); |
| | | } |
| | | int rt = eventVisitingTasksMapper.updateEventStatus(id,EventTasksStatusEnum.DZF.getCode()); |
| | | int rt = eventVisitingTasksMapper.updateEventStatus(eventVisitingTasksDO.getId(),EventTasksStatusEnum.DZF.getCode()); |
| | | if(rt > 0){ |
| | | return R.ok(); |
| | | } |
| | |
| | | e.grid_member_name like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.event_title like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.happen_address like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.order_sn like concat('%', #{pageEventManageDTO.keyWord},'%') |
| | | e.order_sn like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.event_clazz like concat('%', #{pageEventManageDTO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="pageEventManageDTO.revokeType!=null"> |
| | |
| | | e.grid_member_name like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | e.event_title like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | e.happen_address like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | e.order_sn like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') |
| | | e.order_sn like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | e.propaganda_type like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | egd.grid_name like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="pagePublicityEventCommunityDTO.revokeType!=null"> |