| | |
| | | public enum EventTasksStatusEnum { |
| | | |
| | | DZF(1,"待走访"), |
| | | YJJ(2,"已解决"), |
| | | ZJJJ(3,"待验证"), |
| | | DYZ(4,"草稿箱"), |
| | | CG(5,"已撤销"), |
| | | YCX(6,"已撤销"), |
| | | YC(7,"异常"), |
| | | YJJ(2,"已走访") |
| | | ; |
| | | |
| | | |
| | |
| | | return item.getName(); |
| | | } |
| | | } |
| | | return YC.getName(); |
| | | return ""; |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value = "需走访人名字") |
| | | private String visiterName; |
| | | |
| | | |
| | | @ExcelProperty(value = "身份证号码",index = 3) |
| | | @ApiModelProperty(value = "身份证号码") |
| | | @EncryptDecryptField |
| | |
| | | @ApiModelProperty(value = "网格员联系方式") |
| | | private String gridMenberTele; |
| | | |
| | | @ApiModelProperty(value = "所属网格") |
| | | private String gridName; |
| | | |
| | | @ApiModelProperty(value = "需走访人员性别") |
| | | private Integer visiterSex; |
| | |
| | | private Boolean urgentDell; |
| | | |
| | | |
| | | @ApiModelProperty(value = "是否异常行为") |
| | | private Boolean exception; |
| | | @ApiModelProperty(value = "是否异常行为(1.是 0.否)") |
| | | private Integer exception; |
| | | |
| | | @ApiModelProperty(value = "走访内容根据重点人员类型输入项不同,录入全部的表单内容数据") |
| | | private String tableContentJson; |
| | |
| | | List<EventWorkVO> dateList = new ArrayList<>(); |
| | | Date now = new Date(); |
| | | for(int i= 6;i>=1;i--){ |
| | | Date date = DateUtils.getDateM(now,-i); |
| | | Date date = DateUtils.getDateM(now,-(i-1)); |
| | | DateTime endDay = DateUtil.endOfMonth(date); |
| | | |
| | | int m = DateUtil.month(endDay); |
| | | m++; |
| | | // m++; |
| | | if(m == 12){ |
| | | m = 0; |
| | | } |
| | |
| | | EventWorkVO eventWorkVO = new EventWorkVO(); |
| | | eventWorkVO.setMonth(monthStr[m]+"月上旬"); |
| | | eventWorkVO.setStart(month+ "-01 00:00:00"); |
| | | eventWorkVO.setEnd(month+ "-"+half+" 23:59:58"); |
| | | eventWorkVO.setEnd(month+ "-"+half+" 23:59:59"); |
| | | dateList.add(eventWorkVO); |
| | | EventWorkVO eventWorkVO1 = new EventWorkVO(); |
| | | eventWorkVO1.setMonth(monthStr[m]+"月下旬"); |
| | | eventWorkVO1.setStart(month+ "-"+half+" 23:59:58"); |
| | | eventWorkVO1.setStart(month+ "-"+half+" 23:59:59"); |
| | | eventWorkVO1.setEnd(DateUtils.getDateFormatString(endDay,"yyyy-MM-dd HH:mm:ss")); |
| | | dateList.add(eventWorkVO1); |
| | | } |
| | | return dateList; |
| | | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | 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 |
| | | @Override |
| | | public R delete(IdDTO idDTO, Long communityId) { |
| | | StringBuilder rt = new StringBuilder(); |
| | | String[] idarr = idDTO.getId().split(","); |
| | | for(String id:idarr){ |
| | | if(StringUtils.isEmpty(id)){ |
| | | continue; |
| | | String[] ids = idDTO.getId().split(","); |
| | | for(String id:ids){ |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(Long.valueOf(id)); |
| | | if(eventVisitingTasksDO != null){ |
| | | if(!Objects.equals(eventVisitingTasksDO.getEventStatus(),EventTasksStatusEnum.DZF.getCode())){ |
| | | return R.fail("您选择的走访任务中有已解决的不可删除"); |
| | | } |
| | | eventVisitingTasksMapper.deleteById(id); |
| | | } |
| | | String error = toDelete(Long.valueOf(id)); |
| | | if(!StringUtils.isEmpty(error)){ |
| | | rt.append(rt); |
| | | } |
| | | } |
| | | if(!StringUtils.isEmpty(rt)){ |
| | | return R.fail("部分删除失败:"+rt.toString()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | if(!Objects.equals(eventVisitingTasksDO.getEventStatus(),EventTasksStatusEnum.DZF.getCode())){ |
| | | return "["+eventVisitingTasksDO.getVisiterName()+"]状态不可删除;"; |
| | | } |
| | | eventVisitingTasksMapper.deleteById(Long.valueOf(id)); |
| | | eventVisitingTasksMapper.deleteById(id); |
| | | return null; |
| | | } |
| | | |
| | |
| | | if(eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.DZF.getCode()){ |
| | | return R.fail("当前状态不可撤销"); |
| | | } |
| | | int rt = eventVisitingTasksMapper.cancel(eventVisitingTasksDO.getId(),EventTasksStatusEnum.YCX.getCode()); |
| | | int rt = eventVisitingTasksMapper.cancel(eventVisitingTasksDO.getId(),5); |
| | | if(rt > 0){ |
| | | return R.ok(); |
| | | } |
| | |
| | | public R reset(IdDTO idDTO) { |
| | | |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(Long.valueOf(idDTO.getId())); |
| | | if(eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.YCX.getCode()){ |
| | | if(eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != 5){ |
| | | return R.fail("当前状态不可恢复"); |
| | | } |
| | | int rt = eventVisitingTasksMapper.updateEventStatus(eventVisitingTasksDO.getId(),EventTasksStatusEnum.DZF.getCode()); |
| | |
| | | |
| | | <select id="findListByPage" parameterType="com.panzhihua.common.model.query.visit.EventTasksQuery" resultType="com.panzhihua.common.model.vos.visit.EventVisitingTasksVO"> |
| | | select vt.id,vt.create_at,vt.create_by,vt.visiter_id,vt.visiter_name,vt.visiter_tele,vt.visiter_sex,vt.visiter_address,vt.dell_user_id,vt.dell_user_name,vt.submit_date,vt.cancel_time,vt.event_status, |
| | | TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.card_no_str,p.label,u.name as creator,p.nation_code |
| | | TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.card_no_str,p.label,u.name as creator,p.nation_code,vt.exception,vt.grid_member_name,vt.grid_menber_tele,egd.name as gridName |
| | | from event_visiting_tasks vt left join com_mng_population p on vt.visiter_id = p.id |
| | | left join sys_user u on vt.create_by = u.user_id |
| | | left join event_grid_data egd on egd.id = vt.grid_id |
| | | where 1=1 |
| | | <if test = "query.communityId != null"> |
| | | and p.act_id = #{query.communityId} |
| | |
| | | </select> |
| | | |
| | | <select id="countNoneComplete" resultType="java.lang.Integer"> |
| | | SELECT count(id) from event_visiting_tasks where visiter_id = #{id} and (event_status = 1 or event_status = 2 or event_status = 4) |
| | | SELECT count(id) from event_visiting_tasks where visiter_id = #{id} and event_status = 1 |
| | | </select> |
| | | |
| | | <update id="updateEventStatus"> |