|
|
|
|
@ -73,6 +73,7 @@ public class TrainServiceImpl extends BaseServiceImpl<TrainMapper, Train> implem |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public boolean saveTrain(Train train) { |
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
// 参训人员
|
|
|
|
|
int a1 = 0; |
|
|
|
|
if (StringUtils.isNotBlank(train.getTrainPerson())) { |
|
|
|
|
@ -95,7 +96,7 @@ public class TrainServiceImpl extends BaseServiceImpl<TrainMapper, Train> implem |
|
|
|
|
trainPerson.setIsEvaluate(0); |
|
|
|
|
personList.add(trainPerson); |
|
|
|
|
messageClient.event(SysTypeEnum.INFORM.getValue(), "培训会议", |
|
|
|
|
"您有新的培训会议待参加,请及时查看详情", 1, 5, s, "/train/project"); |
|
|
|
|
"您有新的培训会议待参加,开始时间:" + format.format(train.getStartTime()) + ",请及时查看详情", 1, 5, s, "/train/project"); |
|
|
|
|
} |
|
|
|
|
trainPersonService.saveBatch(personList); |
|
|
|
|
} |
|
|
|
|
@ -116,8 +117,8 @@ public class TrainServiceImpl extends BaseServiceImpl<TrainMapper, Train> implem |
|
|
|
|
trainSpeak.setTel(teacher.getTel()); |
|
|
|
|
trainSpeak.setStatus(0); |
|
|
|
|
speakList.add(trainSpeak); |
|
|
|
|
messageClient.event(SysTypeEnum.INFORM.getValue(), "培训会议", |
|
|
|
|
"您有新的培训会议待参加,请及时查看详情", 1, 5, train.getTeacher().toString(), "/train/project"); |
|
|
|
|
// messageClient.event(SysTypeEnum.INFORM.getValue(), "培训会议",
|
|
|
|
|
// "您有新的培训会议待参加,开始时间:" + format.format(train.getStartTime()) + ",请及时查看详情", 1, 5, train.getTeacher().toString(), "/train/project");
|
|
|
|
|
} |
|
|
|
|
trainSpeakService.saveBatch(speakList); |
|
|
|
|
} |
|
|
|
|
@ -184,6 +185,7 @@ public class TrainServiceImpl extends BaseServiceImpl<TrainMapper, Train> implem |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public boolean updateTrain(Train train) throws Exception { |
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
// 删除参训人员记录
|
|
|
|
|
LambdaQueryWrapper<TrainPerson> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper.eq(TrainPerson::getTrainId, train.getId()); |
|
|
|
|
@ -215,7 +217,7 @@ public class TrainServiceImpl extends BaseServiceImpl<TrainMapper, Train> implem |
|
|
|
|
trainPerson.setIsEvaluate(0); |
|
|
|
|
personList.add(trainPerson); |
|
|
|
|
messageClient.event(SysTypeEnum.INFORM.getValue(), "培训会议", |
|
|
|
|
"您有新的培训会议待参加,请及时查看详情", 1, 5, s, "/train/project"); |
|
|
|
|
"您有新的培训会议待参加,开始时间:" + format.format(train.getStartTime()) + ",请及时查看详情", 1, 5, s, "/train/project"); |
|
|
|
|
} |
|
|
|
|
trainPersonService.saveBatch(personList); |
|
|
|
|
} |
|
|
|
|
@ -237,8 +239,8 @@ public class TrainServiceImpl extends BaseServiceImpl<TrainMapper, Train> implem |
|
|
|
|
trainSpeak.setTel(teacher.getTel()); |
|
|
|
|
trainSpeak.setStatus(0); |
|
|
|
|
speakList.add(trainSpeak); |
|
|
|
|
messageClient.event(SysTypeEnum.INFORM.getValue(), "培训会议", |
|
|
|
|
"您有新的培训会议待参加,请及时查看详情", 1, 5, train.getTeacher().toString(), "/train/project"); |
|
|
|
|
// messageClient.event(SysTypeEnum.INFORM.getValue(), "培训会议",
|
|
|
|
|
// "您有新的培训会议待参加,开始时间:" + format.format(train.getStartTime()) + ",请及时查看详情", 1, 5, train.getTeacher().toString(), "/train/project");
|
|
|
|
|
} |
|
|
|
|
trainSpeakService.saveBatch(speakList); |
|
|
|
|
} |
|
|
|
|
@ -325,19 +327,20 @@ public class TrainServiceImpl extends BaseServiceImpl<TrainMapper, Train> implem |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public void messageNotice(Train train) { |
|
|
|
|
Train byId = this.getById(train.getId()); |
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
// Train byId = this.getById(train.getId());
|
|
|
|
|
// 通知主讲人
|
|
|
|
|
messageClient.event(SysTypeEnum.INFORM.getValue(), "培训会议", |
|
|
|
|
"您有培训会议待参加,请及时查看详情", 1, 5, byId.getTeacher().toString(), "/train/project"); |
|
|
|
|
// messageClient.event(SysTypeEnum.INFORM.getValue(), "培训会议",
|
|
|
|
|
// "您有培训会议待参加,请及时查看详情", 1, 5, byId.getTeacher().toString(), "/train/project");
|
|
|
|
|
|
|
|
|
|
// 通知参训人员
|
|
|
|
|
LambdaQueryWrapper<TrainPerson> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper.eq(TrainPerson::getTrainId, byId.getId()); |
|
|
|
|
wrapper.eq(TrainPerson::getTrainId, train.getId()); |
|
|
|
|
List<TrainPerson> personList = trainPersonService.list(wrapper); |
|
|
|
|
if (personList != null && personList.size() > 0) { |
|
|
|
|
if (CollectionUtils.isNotEmpty(personList)) { |
|
|
|
|
for (TrainPerson trainPerson : personList) { |
|
|
|
|
messageClient.event(SysTypeEnum.INFORM.getValue(), "培训会议", |
|
|
|
|
"您有培训会议待参加,请及时查看详情", 1, 5, trainPerson.getPersonId().toString(), "/train/project"); |
|
|
|
|
"您有新的培训会议待参加,开始时间:" + format.format(train.getStartTime()) + ",请及时查看详情", 1, 5, trainPerson.getPersonId().toString(), "/train/project"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -357,7 +360,7 @@ public class TrainServiceImpl extends BaseServiceImpl<TrainMapper, Train> implem |
|
|
|
|
LambdaQueryWrapper<Teacher> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
queryWrapper.eq(Teacher::getTeacherId, byId.getTeacher()); |
|
|
|
|
Teacher teacher = teacherService.getOne(queryWrapper); |
|
|
|
|
Integer praise = teacher.getPraise(); |
|
|
|
|
// Integer praise = teacher.getPraise();
|
|
|
|
|
// teacher.setPraise(praise + train.getEvaluateScore());
|
|
|
|
|
teacherService.updateById(teacher); |
|
|
|
|
} |
|
|
|
|
@ -391,16 +394,12 @@ public class TrainServiceImpl extends BaseServiceImpl<TrainMapper, Train> implem |
|
|
|
|
result.put("6", train.getPlace()); |
|
|
|
|
result.put("7", train.getTrainTarget()); |
|
|
|
|
// 考核方式
|
|
|
|
|
result.put("8", DictBizCache.getValue(DictBizEnum.ASSESSMENT_METHOD.getName(), train.getAssessmentMethod())); |
|
|
|
|
// result.put("8", DictBizCache.getValue(DictBizEnum.ASSESSMENT_METHOD.getName(), train.getAssessmentMethod()));
|
|
|
|
|
result.put("8", train.getAssessmentMethod()); |
|
|
|
|
// 培训主体内容
|
|
|
|
|
result.put("9", train.getContentSubject()); |
|
|
|
|
// 培训有效性评价
|
|
|
|
|
result.put("10", train.getTrainEvaluate()); |
|
|
|
|
|
|
|
|
|
// result.put("11", train.getRecordName());
|
|
|
|
|
// result.put("12", format.format(train.getRecordTime()));
|
|
|
|
|
// result.put("13", train.getEvaluateName());
|
|
|
|
|
// result.put("14", format.format(train.getEvaluateTime()));
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String url = DictBizCache.getKey(DictBizEnum.PRINT_URL.getName(), "trainUserLog"); |
|
|
|
|
|