| | |
| | | if (comActActActRegistDO.getEndTime() != null) { |
| | | return R.fail("无法重复签退"); |
| | | } |
| | | |
| | | //1.居民 2.党员 3.志愿者 |
| | | switch (comActActActRegistDO.getSignIdentity()) |
| | | { |
| | | case 1: |
| | | if(comActActivityDO.getParticipantRewardWay()==1) |
| | | { |
| | | rewardIntegral=rewardIntegral*(comActActActRegistDO.getTimes()); |
| | | } |
| | | if(comActActivityDO.getParticipantRewardWay()==2) |
| | | { |
| | | int hours = com.panzhihua.common.utlis.DateUtils.getHour(comActActActRegistDO.getStartTime(), comActActActRegistDO.getEndTime()); |
| | | if(hours>1) |
| | | { |
| | | rewardIntegral=rewardIntegral * hours; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | case 2: |
| | | if(comActActivityDO.getPbRewardWay()==1) |
| | | { |
| | | rewardIntegral=rewardIntegral*(comActActActRegistDO.getTimes()); |
| | | } |
| | | if(comActActivityDO.getPbRewardWay()==2) |
| | | { |
| | | int hours = com.panzhihua.common.utlis.DateUtils.getHour(comActActActRegistDO.getStartTime(), comActActActRegistDO.getEndTime()); |
| | | if(hours>1) |
| | | { |
| | | rewardIntegral=rewardIntegral * hours; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | case 3: |
| | | if(comActActivityDO.getVolunteerRewardWay()==1) |
| | | { |
| | | rewardIntegral=rewardIntegral*(comActActActRegistDO.getTimes()); |
| | | } |
| | | if(comActActivityDO.getVolunteerRewardWay()==2) |
| | | { |
| | | int hours = com.panzhihua.common.utlis.DateUtils.getHour(comActActActRegistDO.getStartTime(), comActActActRegistDO.getEndTime()); |
| | | if(hours>1) |
| | | { |
| | | rewardIntegral=rewardIntegral * hours; |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | |
| | | comActActRegistDO.setId(comActActActRegistDO.getId()); |
| | | comActActRegistDO.setEndTime(nowDate); |
| | | comActActRegistDO.setAward(rewardIntegral); |
| | | |
| | | int result = comActActRegistDAO.updateById(comActActRegistDO); |
| | | if (result > 0) { |
| | | if (isHave) { |