101captain
2022-06-29 d084983be7c39942ed9a0573d22789b543339f79
bug修改
18个文件已修改
164 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/pom.xml 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/LoginUserInfoVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActivityVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/EditNeighborCircleAdminVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActActivityDO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleDO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComPbMemberDO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/pom.xml
@@ -75,19 +75,19 @@
    </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>
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java
@@ -245,5 +245,11 @@
    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);
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/LoginUserInfoVO.java
@@ -222,6 +222,9 @@
    @ApiModelProperty("是否单位管理员 1是 0否")
    private Integer isCheckUnitAdmin;
    @ApiModelProperty("报道单位id")
    private Long checkUnitId;
    public String retrieveRelationName() {
        return this.type == 3 ? relationName : name;
    }
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActivityVO.java
@@ -291,4 +291,6 @@
    private Long relationId;
    @ApiModelProperty("关联手机")
    private String phone;
    @ApiModelProperty("单位id")
    private Long checkUnitId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/EditNeighborCircleAdminVO.java
@@ -35,6 +35,8 @@
    private Integer solveStatus;
    @ApiModelProperty("接单人id")
    private Long solveId;
    @ApiModelProperty("接单单位id")
    private Long solveUnitId;
    @ApiModelProperty("反馈内容")
    private String solveContent;
    @ApiModelProperty("反馈图片")
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -5941,6 +5941,9 @@
    @PostMapping("/neighbor/update")
    R order(@RequestBody EditNeighborCircleAdminVO editNeighborCircleAdminVO);
    @PostMapping("/neighbor/serviceStatic")
    R serviceStatic(@RequestBody ServiceStaticDTO serviceStaticDTO);
    /**
     * 获取系统配置value
     * @param key   系统配置code
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -339,4 +339,13 @@
     * @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);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
@@ -141,5 +141,11 @@
    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);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActActivityDO.java
@@ -251,4 +251,6 @@
    private Long relationId;
    private String phone;
    private Long checkUnitId;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleDO.java
@@ -166,6 +166,8 @@
    private String helpOrgContent;
    private Long solveUnitId;
    @Override
    public String toString() {
        return "ComActNeighborCircleDO{" + "id=" + id + ", releaseId=" + releaseId + ", releasePhone=" + releasePhone
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComPbMemberDO.java
@@ -85,4 +85,8 @@
     */
    private String refuseReason;
    private String phone;
    private Long checkUnitId;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -17,6 +17,7 @@
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;
@@ -88,6 +89,8 @@
    private ComActActivityCodeService comActActivityCodeService;
    @Resource
    private ComActDAO comActDAO;
    @Resource
    private ComPbCheckUnitDao comPbCheckUnitDao;
    /**
     * 新增社区活动
@@ -121,6 +124,9 @@
        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();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -70,6 +70,8 @@
    private UserService userService;
    @Resource
    private ComPbMemberDAO comPbMemberDAO;
    @Resource
    private ComActActivityDAO comActActivityDAO;
    /**
     * 分页查询邻里圈列表
     *
@@ -984,8 +986,20 @@
    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);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
@@ -270,4 +270,20 @@
        </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>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -218,8 +218,46 @@
    </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>
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
@@ -265,6 +265,13 @@
    Integer selectOrgAdmin(@Param("phone") String phone);
    /**
     * 查询报道单位id
     * @param phone
     * @return
     */
    Long selectCheckUnitId(@Param("phone") String phone);
    /**
     * 根据社区名称查询区县社区联动关系
     * @param relationName
     * @return
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -415,6 +415,10 @@
            else {
                loginUserInfoVO.setIsCheckUnitAdmin(0);
            }
            Long checkUnitId=userDao.selectCheckUnitId(phone);
            if(checkUnitId!=null){
                loginUserInfoVO.setCheckUnitId(checkUnitId);
            }
            //是否网格员
            int easyPhotoMember = userDao.countEasyPhotoMember(phone, userCommunityId);
            if (easyPhotoMember > 0) {
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml
@@ -560,4 +560,8 @@
    <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>