| | |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <resources> |
| | | <resource> |
| | | <directory>${project.basedir}/src/main/resources/lib</directory> |
| | | <targetPath>/BOOT-INF/lib/</targetPath> |
| | | <includes> |
| | | <include>**/*.jar</include> |
| | | </includes> |
| | | </resource> |
| | | <resource> |
| | | <directory>src/main/resources</directory> |
| | | <targetPath>BOOT-INF/classes/</targetPath> |
| | | </resource> |
| | | </resources> |
| | | <!-- <resources>--> |
| | | <!-- <resource>--> |
| | | <!-- <directory>${project.basedir}/src/main/resources/lib</directory>--> |
| | | <!-- <targetPath>/BOOT-INF/lib/</targetPath>--> |
| | | <!-- <includes>--> |
| | | <!-- <include>**/*.jar</include>--> |
| | | <!-- </includes>--> |
| | | <!-- </resource>--> |
| | | <!-- <resource>--> |
| | | <!-- <directory>src/main/resources</directory>--> |
| | | <!-- <targetPath>BOOT-INF/classes/</targetPath>--> |
| | | <!-- </resource>--> |
| | | <!-- </resources>--> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | public R order(@RequestBody EditNeighborCircleAdminVO editNeighborCircleAdminVO){ |
| | | return this.communityService.order(editNeighborCircleAdminVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "服务统计",response = ServiceStaticsVO.class) |
| | | @PostMapping("/serviceStatic") |
| | | public R serviceStatic(@RequestBody ServiceStaticDTO serviceStaticDTO){ |
| | | return this.communityService.serviceStatic(serviceStaticDTO); |
| | | } |
| | | } |
| | | |
| | |
| | | @ApiModelProperty("是否单位管理员 1是 0否") |
| | | private Integer isCheckUnitAdmin; |
| | | |
| | | @ApiModelProperty("报道单位id") |
| | | private Long checkUnitId; |
| | | |
| | | public String retrieveRelationName() { |
| | | return this.type == 3 ? relationName : name; |
| | | } |
| | |
| | | private Long relationId; |
| | | @ApiModelProperty("关联手机") |
| | | private String phone; |
| | | @ApiModelProperty("单位id") |
| | | private Long checkUnitId; |
| | | } |
| | |
| | | private Integer solveStatus; |
| | | @ApiModelProperty("接单人id") |
| | | private Long solveId; |
| | | @ApiModelProperty("接单单位id") |
| | | private Long solveUnitId; |
| | | @ApiModelProperty("反馈内容") |
| | | private String solveContent; |
| | | @ApiModelProperty("反馈图片") |
| | |
| | | @PostMapping("/neighbor/update") |
| | | R order(@RequestBody EditNeighborCircleAdminVO editNeighborCircleAdminVO); |
| | | |
| | | @PostMapping("/neighbor/serviceStatic") |
| | | R serviceStatic(@RequestBody ServiceStaticDTO serviceStaticDTO); |
| | | |
| | | /** |
| | | * 获取系统配置value |
| | | * @param key 系统配置code |
| | |
| | | * @return |
| | | */ |
| | | List<PartyMemberDetailExcelVO> exportPartyMemberDetail(@Param("commonPage") CommonPage commonPage); |
| | | |
| | | List<ComActActivityVO> selectListByRelationId(@Param("relationId") Long relationId,@Param("date")String date); |
| | | |
| | | /** |
| | | * 查询进行中活动 |
| | | * @param communityId 社区id |
| | | * @return 活动列表 |
| | | */ |
| | | List<ComActActivityVO> selectListByCommunityId(@Param("communityId") Long communityId,@Param("date") String date); |
| | | } |
| | |
| | | |
| | | IPage<ComActNeighborCircleAdminVO> indexNeighborList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); |
| | | |
| | | ServiceStaticsVO selectStatsCheckUnit(Long checkUnitId); |
| | | ServiceStaticsVO selectStatsCheckUnit(@Param("checkUnitId") Long checkUnitId,@Param("date")String date); |
| | | |
| | | ServiceStaticsVO selectStatsUser(@Param("phone") String phone,@Param("date")String date); |
| | | |
| | | List<ComActNeighborCircleAppVO> selectListByCheckUnitId(@Param("checkUnitId")Long checkUnitId,@Param("date")String date); |
| | | |
| | | List<ComActNeighborCircleAppVO> selectListByPhone(@Param("phone")String phone,@Param("date")String date); |
| | | } |
| | |
| | | private Long relationId; |
| | | |
| | | private String phone; |
| | | |
| | | private Long checkUnitId; |
| | | } |
| | |
| | | |
| | | private String helpOrgContent; |
| | | |
| | | private Long solveUnitId; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActNeighborCircleDO{" + "id=" + id + ", releaseId=" + releaseId + ", releasePhone=" + releasePhone |
| | |
| | | */ |
| | | private String refuseReason; |
| | | |
| | | private String phone; |
| | | |
| | | private Long checkUnitId; |
| | | |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.service_community.entity.ComPbCheckUnit; |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | |
| | | private ComActActivityCodeService comActActivityCodeService; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ComPbCheckUnitDao comPbCheckUnitDao; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | if(comActActivityVO.getType()==4){ |
| | | comActActivityDO.setIsProject(1); |
| | | } |
| | | if(comActActivityVO.getType()==5){ |
| | | comPbCheckUnitDao.selectOne(new QueryWrapper<ComPbCheckUnit>().lambda().eq(ComPbCheckUnit::getAdminPhone,comActActivityVO.getPhone()).last("limit 1")); |
| | | } |
| | | boolean save = this.save(comActActivityDO); |
| | | if (!save) { |
| | | return R.fail(); |
| | |
| | | private UserService userService; |
| | | @Resource |
| | | private ComPbMemberDAO comPbMemberDAO; |
| | | @Resource |
| | | private ComActActivityDAO comActActivityDAO; |
| | | /** |
| | | * 分页查询邻里圈列表 |
| | | * |
| | |
| | | public R serviceStatic(ServiceStaticDTO serviceStaticDTO) { |
| | | ServiceStaticsVO serviceStaticsVO=new ServiceStaticsVO(); |
| | | if(serviceStaticDTO.getCheckUnitId()!=null){ |
| | | serviceStaticsVO=this.baseMapper.selectStatsCheckUnit(serviceStaticDTO.getCheckUnitId()); |
| | | serviceStaticsVO=this.baseMapper.selectStatsCheckUnit(serviceStaticDTO.getCheckUnitId(),serviceStaticDTO.getYear()); |
| | | serviceStaticsVO.setServiceProjecList(this.baseMapper.selectListByCheckUnitId(serviceStaticDTO.getCheckUnitId(),serviceStaticDTO.getYear())); |
| | | serviceStaticsVO.setServiceActivityList(comActActivityDAO.selectListByRelationId(serviceStaticDTO.getCheckUnitId(),serviceStaticDTO.getYear())); |
| | | } |
| | | return null; |
| | | else { |
| | | serviceStaticsVO=this.baseMapper.selectStatsUser(serviceStaticDTO.getPhone(),serviceStaticDTO.getYear()); |
| | | serviceStaticsVO.setServiceProjecList(this.baseMapper.selectListByPhone(serviceStaticDTO.getPhone(),serviceStaticDTO.getYear())); |
| | | ComPbMemberDO comPbMemberDO=comPbMemberDAO.selectOne(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getPhone,serviceStaticDTO.getPhone()).last("limit 1")); |
| | | if(comPbMemberDO!=null){ |
| | | serviceStaticsVO.setWorkActivityList(comActActivityDAO.selectListByRelationId(comPbMemberDO.getCheckUnitId(),serviceStaticDTO.getYear())); |
| | | serviceStaticsVO.setServiceActivityList(comActActivityDAO.selectListByCommunityId(comPbMemberDO.getCommunityId(),serviceStaticDTO.getYear())); |
| | | } |
| | | |
| | | } |
| | | return R.ok(serviceStaticsVO); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | order by t.begin_at desc |
| | | </select> |
| | | |
| | | <select id="selectListByRelationId" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT a.id, a.activity_name, u.`name` sponsorName, a.activity_addr, a.participant_max, a.contact_name, |
| | | a.volunteer_max, |
| | | a.`status`, a.publish_at, |
| | | a.is_qr_code, a.begin_at, a.end_at, a.sign_up_begin, a.sign_up_end, a.reward_way, a.activity_type, a.have_integral_reward ,a.reward_integral,a.party_member_max,a.party_member_min,a.cover,a.type,a.duration |
| | | FROM com_act_activity a |
| | | LEFT JOIN sys_user u ON a.sponsor_id=u.user_id |
| | | LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) s ON a.id=s.activity_id |
| | | where a.check_unit_id = #{relationId} and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') |
| | | </select> |
| | | |
| | | <select id="selectListByCommunityId" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT * FROM `com_act_activity` |
| | | WHERE community_id = #{communityId} and type = 3 and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') |
| | | </select> |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="selectStatsCheckUnit" resultType="com.panzhihua.common.model.vos.neighbor.ServiceStaticsVO"> |
| | | select count(t1.checkId) as times,sum(t1.hours) as hours from ((select real_service_time as hours,solve_id as checkId from com_act_neighbor_circle where order_type = 1 and solve_status = 4 and solve_id = #{checkUnitId}) union all |
| | | (select duration as hours,relation_id as checkId from com_act_activity where relation_id = #{checkUnitId})) t1 |
| | | select count(t1.checkId) as times,sum(t1.hours) as hours from ((select real_service_time as hours,solve_unit_id as checkId from com_act_neighbor_circle where order_type = 1 and solve_status = 4 and solve_unit_id = #{checkUnitId} and create_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59')) union all |
| | | (select duration as hours,check_unit_id as checkId from com_act_activity where check_unit_id = #{checkUnitId} and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59'))) t1 |
| | | </select> |
| | | |
| | | |
| | | <select id="selectListByCheckUnitId" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO"> |
| | | SELECT |
| | | canc.*, |
| | | su.nick_name as name, |
| | | su.community_id, |
| | | ca.`name` as communityName, |
| | | canct.name as topicName, |
| | | su.image_url as headUrl |
| | | FROM |
| | | com_act_neighbor_circle AS canc |
| | | left join sys_user as su on su.user_id = canc.release_id |
| | | left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id |
| | | left join com_act as ca on ca.community_id = canc.community_id |
| | | where is_del = 2 and canc.solve_unit_id = #{checkUnitId} and canc.create_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') |
| | | </select> |
| | | |
| | | <select id="selectStatsUser" resultType="com.panzhihua.common.model.vos.neighbor.ServiceStaticsVO"> |
| | | select count(t1.checkId) as times,sum(t1.hours) as hours from ((select real_service_time as hours,solve_id as checkId from com_act_neighbor_circle canc left join sys_user su on canc.solve_id = su.user_id where order_type = 2 and solve_status = 4 and su.phone = #{phone} and canc.create_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59')) union all |
| | | (select duration as hours,caas.user_id as checkId from com_act_activity caa LEFT JOIN com_act_act_sign caas on caa.id = caas.activity_id left join sys_user su on caas.user_id = su.user_id where caas.`status` = 1 and su.phone =#{phone} and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59'))) t1 |
| | | </select> |
| | | |
| | | <select id="selectListByPhone" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO"> |
| | | SELECT |
| | | canc.*, |
| | | su.nick_name as name, |
| | | su.community_id, |
| | | ca.`name` as communityName, |
| | | canct.name as topicName, |
| | | su.image_url as headUrl |
| | | FROM |
| | | com_act_neighbor_circle AS canc |
| | | left join sys_user as su on su.user_id = canc.release_id |
| | | left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id |
| | | left join com_act as ca on ca.community_id = canc.community_id |
| | | left join sys_user su1 on su1.user_id = canc.solve_id |
| | | where is_del = 2 and su1.phone = #{phone} and canc.create_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') |
| | | </select> |
| | | </mapper> |
| | |
| | | Integer selectOrgAdmin(@Param("phone") String phone); |
| | | |
| | | /** |
| | | * 查询报道单位id |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | Long selectCheckUnitId(@Param("phone") String phone); |
| | | |
| | | /** |
| | | * 根据社区名称查询区县社区联动关系 |
| | | * @param relationName |
| | | * @return |
| | |
| | | else { |
| | | loginUserInfoVO.setIsCheckUnitAdmin(0); |
| | | } |
| | | Long checkUnitId=userDao.selectCheckUnitId(phone); |
| | | if(checkUnitId!=null){ |
| | | loginUserInfoVO.setCheckUnitId(checkUnitId); |
| | | } |
| | | //是否网格员 |
| | | int easyPhotoMember = userDao.countEasyPhotoMember(phone, userCommunityId); |
| | | if (easyPhotoMember > 0) { |
| | |
| | | <select id="selectOrgAdmin" resultType="Integer"> |
| | | select count(*) from com_pb_check_unit where admin_phone like concat('%',#{phone},'%') |
| | | </select> |
| | | |
| | | <select id="selectCheckUnitId" resultType="Long"> |
| | | select check_unit_id from com_pb_member where phone = #{phone} limit 1 |
| | | </select> |
| | | </mapper> |