Commit 1964cc78 authored by zhangqingle's avatar zhangqingle

修改签到时间无法显示问题

parent c84a7753
......@@ -483,7 +483,7 @@ public class BChapterServiceImpl implements BChapterService {
}
}
//TODO 判断 曾经是否学完过 奖励积分
if ( "2".equals(lessonPerson.getIsFinish()) && !"1".equals(lessonPerson.getEverFinished())){
if ( "2".equals(lessonPerson.getIsFinish()) && !("1".equals(lessonPerson.getEverFinished()))){
//查询课程信息
BPersonValue bPersonValue = new BPersonValue(lessonPerson.getPersonId(),"学完"+bLesson.getLessonName()+"课程",bLesson.getValueGain(),"0");
bLessonServiceImpl.addValueEvent(lessonPerson.getPersonId(),bPersonValue,null);
......
......@@ -381,8 +381,11 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
if (now.before(signStart) || bLesson.getTrainOverDate().before(now)){
throw new ServiceException(ResultServiceEnums.NOT_SIGN_DATE);
}
if ("2".equals(bLessonPerson.getTrainIsSign())){
throw new ServiceException(ResultServiceEnums.TRAIN_SIGNED);
}
//TODO 判断 曾经是否学完过 奖励积分
if ( !"2".equals(bLessonPerson.getTrainIsSign()) && !"1".equals(bLessonPerson.getEverFinished())){
if ( !("2".equals(bLessonPerson.getTrainIsSign())) && !("1".equals(bLessonPerson.getEverFinished()))){
//查询课程信息
BPersonValue bPersonValue = new BPersonValue(bLessonPerson.getPersonId(),"参加"+bLesson.getLessonName()+"培训",bLesson.getValueGain(),"0");
bLessonServiceImpl.addValueEvent(bLessonPerson.getPersonId(),bPersonValue,null);
......
......@@ -1095,7 +1095,7 @@ public class BLessonServiceImpl implements BLessonService {
}
BLesson bLesson = bLessonRepository.selectByPrimaryKey(bLessonPerson.getLessonId());
//TODO 判断 曾经是否学完过 奖励积分
if ("2".equals(setTrainIsSignDTO.getTrainIsSign()) && !"2".equals(bLessonPerson.getTrainIsSign()) && !"1".equals(bLessonPerson.getEverFinished()) && bLesson != null) {
if ("2".equals(setTrainIsSignDTO.getTrainIsSign()) && !("2".equals(bLessonPerson.getTrainIsSign())) && !("1".equals(bLessonPerson.getEverFinished())) && bLesson != null) {
//查询课程信息
BPersonValue bPersonValue = new BPersonValue(bLessonPerson.getPersonId(), "参加" + bLesson.getLessonName() + "培训", bLesson.getValueGain(), "0");
addValueEvent(bLessonPerson.getPersonId(), bPersonValue, null);
......
package org.rcisoft.common.util.feignClient;
import org.rcisoft.common.util.feignDto.HaveJurisdictionReqDTO;
import org.rcisoft.common.util.feignDto.MTNotificationSendReqDTO;
import org.rcisoft.core.result.Ret;
import org.springframework.cloud.openfeign.FeignClient;
......@@ -25,4 +26,16 @@ public interface MicroappFeignClient {
@RequestParam("zxClientType") String zxClientType,
@RequestParam("zxAccountId") Long zxAccountId);
/**
* 批量查询
* @param haveJurisdictionReqDTO
* @param zxClientType
* @param zxAccountId
* @return
*/
@RequestMapping(value = "/micro_app/haveJurisdictionUser",method = RequestMethod.POST)
Ret haveJurisdictionUser(@RequestParam("haveJurisdictionReqDTO") HaveJurisdictionReqDTO haveJurisdictionReqDTO,
@RequestParam("zxClientType") String zxClientType,
@RequestParam("zxAccountId") Long zxAccountId);
}
package org.rcisoft.common.util.feignDto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HaveJurisdictionReqDTO {
@NotNull
private Long corpId;
@NotNull
private List<Long> userIds;
@NotNull
private Long appId;
public HaveJurisdictionReqDTO(Long corpId,List<Long> userIds){
this.corpId = corpId;
this.userIds = userIds;
}
}
\ No newline at end of file
......@@ -3,12 +3,15 @@ package org.rcisoft.common.util.outClient;
import lombok.extern.slf4j.Slf4j;
import org.rcisoft.common.util.feignClient.FileFeignClient;
import org.rcisoft.common.util.feignClient.MicroappFeignClient;
import org.rcisoft.common.util.feignDto.HaveJurisdictionReqDTO;
import org.rcisoft.common.util.feignDto.MTOssRspDTO;
import org.rcisoft.core.result.Ret;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* 消息通知接口调用
* @author David
......@@ -35,4 +38,9 @@ public class MTMicroappApiRequestClient {
return false;
}
public Ret haveJurisdictionUser(HaveJurisdictionReqDTO haveJurisdictionReqDTO) {
Ret ret = microappFeignClient.haveJurisdictionUser(haveJurisdictionReqDTO,zxClientType,zxAccountId);
return ret;
}
}
......@@ -11,6 +11,7 @@ import org.rcisoft.business.bmessage.entity.BMessage;
import org.rcisoft.business.bnotice.entity.BNotice;
import org.rcisoft.business.bnotice.service.BNoticeService;
import org.rcisoft.common.model.InfoTypeEnum;
import org.rcisoft.common.util.feignDto.HaveJurisdictionReqDTO;
import org.rcisoft.core.exception.ServiceException;
import org.rcisoft.core.result.NotiRet;
import org.rcisoft.core.result.ResultCode;
......@@ -128,7 +129,9 @@ public class MTNotificationApiRequestClient {
List<String> reciIds = new ArrayList<>();
List<SysUser> personnelsList = sysUserMapper.selectByIds(message.getRecipientIds());
if (null !=personnelsList && personnelsList.size() >0) {
if (null != personnelsList && personnelsList.size() > 0 && personnelsList.get(0) != null) {
// HaveJurisdictionReqDTO haveJurisdictionReqDTO = new HaveJurisdictionReqDTO(Long.parseLong(message.getRecipientIds(), Long.parseLong(message.getCorpId()));
// Ret haveJurisList = microappApiRequestClient.haveJurisdictionUser(haveJurisdictionReqDTO);
for (SysUser sysUser : personnelsList) {
// 判断通知管理权限
......
......@@ -250,6 +250,7 @@ public enum ResultServiceEnums {
NOT_SIGN_DATE(150,"当前时间不在签到时间范围内"),
FILE_NOT_NULL(151,"文件内容不能为空"),
VALUE_NOT_NULL(152,"积分不能为空"),
TRAIN_SIGNED(153,"您已签到,请勿重复签到"),
;
private Integer code;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment