lidongdong
2024-09-20 2a0ddb202b816ba0e05240b210ad8231a70edffa
花城 新增社区活动  新双争双评需求问题清单自动更新未签退时间4
6个文件已修改
68 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActRegistDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActRegistServiceImpl.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActRegistMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/NeedProblemClaimDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NeedProblemClaimServiceImpl.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/NeedProblemClaimMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActRegistDAO.java
@@ -63,7 +63,7 @@
     * @param activityId
     * @return
     */
    List<String> getNotTimeUser(@Param("activityId") String activityId);
    List<ComActActRegistVO> getNotTimeUser(@Param("activityId") String activityId);
    /**
     * 根据活动id获取活动结束时间
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActRegistServiceImpl.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActActRegistVO;
import com.panzhihua.service_community.dao.ComActActRegistDAO;
import com.panzhihua.service_community.model.dos.ComActActRegistDO;
import com.panzhihua.service_community.model.dos.ComActActivityDO;
@@ -9,6 +10,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@@ -35,15 +37,29 @@
            for (String aId:activityList)
            {
                ComActActivityDO comActActivityDO=baseMapper.getActivityEndTime(aId);
                if(comActActivityDO.getEndAt().getTime()<new Date().getTime())
                if(comActActivityDO!=null)
                {
                    List<String> timeList=baseMapper.getNotTimeUser(aId);
                    for (String user:timeList)
                    if(comActActivityDO.getEndAt().getTime()<new Date().getTime())
                    {
                        baseMapper.updateEndTime(user,comActActivityDO.getEndAt());
                        List<ComActActRegistVO> timeList=baseMapper.getNotTimeUser(aId);
                        for (ComActActRegistVO user:timeList)
                        {
                            baseMapper.updateEndTime(user.getId()+"",comActActivityDO.getEndAt());
                        }
                    }
                }
                else
                {
                    List<ComActActRegistVO> timeList2=baseMapper.getNotTimeUser(aId);
                    for(ComActActRegistVO user2:timeList2)
                    {
                        Calendar calendar = Calendar.getInstance();
                        calendar.setTime(user2.getStartTime());
                        calendar.add(Calendar.HOUR_OF_DAY, 3); // 加5小时
                        baseMapper.updateEndTime(user2.getId()+"",calendar.getTime());
                    }
                }
            }
        }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActRegistMapper.xml
@@ -184,8 +184,8 @@
    <!--  根据活动id获取没有签退的人员  -->
    <select id="getNotTimeUser" resultType="String">
        select id from com_act_act_regist where end_time is null and activity_id =#{activityId}
    <select id="getNotTimeUser" resultType="com.panzhihua.common.model.vos.community.ComActActRegistVO">
        select id,start_time from com_act_act_regist where end_time is null and activity_id =#{activityId}
    </select>
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/NeedProblemClaimDAO.java
@@ -65,7 +65,7 @@
    /**
     * 根据活动id获取没有签退的人员
     */
    List<String> getNotTimeId(@Param("taskId") String taskId);
    List<NeedProblemClaimDTO> getNotTimeId(@Param("taskId") String taskId);
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NeedProblemClaimServiceImpl.java
@@ -4,6 +4,7 @@
import com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO;
import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActActRegistVO;
import com.panzhihua.common.utlis.Snowflake;
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.service_dangjian.dao.NeedProblemClaimDAO;
@@ -14,6 +15,7 @@
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@@ -232,15 +234,33 @@
            {
                NeedProblemInventoryDTO comActActivityDO=baseMapper.getActivityEndTime(aId);
                if(comActActivityDO.getNeedEndTime().getTime()<new Date().getTime())
                if(comActActivityDO!=null)
                {
                    List<String> timeList=baseMapper.getNotTimeId(aId);
                    for (String user:timeList)
                    if(comActActivityDO.getNeedEndTime().getTime()<new Date().getTime())
                    {
                        long time=comActActivityDO.getNeedEndTime().getTime()-comActActivityDO.getNeedStartTime().getTime();
                        baseMapper.updateEndTime(user,time+"",comActActivityDO.getNeedEndTime());
                        List<NeedProblemClaimDTO> timeList=baseMapper.getNotTimeId(aId);
                        for (NeedProblemClaimDTO user:timeList)
                        {
                            long time=comActActivityDO.getNeedEndTime().getTime()-comActActivityDO.getNeedStartTime().getTime();
                            baseMapper.updateEndTime(user.getId(),time+"",comActActivityDO.getNeedEndTime());
                        }
                    }
                }
                else
                {
                    List<NeedProblemClaimDTO> timeList=baseMapper.getNotTimeId(aId);
                    for (NeedProblemClaimDTO user:timeList)
                    {
                        Calendar calendar = Calendar.getInstance();
                        calendar.setTime(user.getPunchStartTime());
                        calendar.add(Calendar.HOUR_OF_DAY, 3); // 加3小时
                        Date newDate = calendar.getTime();
                        long time=newDate.getTime()-user.getPunchStartTime().getTime();
                        baseMapper.updateEndTime(user.getId(),time+"",newDate);
                    }
                }
            }
        }
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/NeedProblemClaimMapper.xml
@@ -523,8 +523,8 @@
    <!--  根据活动id获取没有签退的人员  -->
    <select id="getNotTimeId" resultType="String">
        select id from new_fight_need_problem_claim where punch_start_time is not null and punch_end_time is null and task_id =#{taskId}
    <select id="getNotTimeId" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO">
        select id,punch_start_time,punch_end_time from new_fight_need_problem_claim where punch_start_time is not null and punch_end_time is null and task_id =#{taskId}
    </select>