Commit 201a0902 authored by mengbali153's avatar mengbali153

完善培训审批

parent 983dfefe
......@@ -124,17 +124,27 @@ public class PlanPeopleServiceImpl extends ServiceImpl<PlanPeopleMapper, PlanPeo
@Override
public BaseResponse synchronization(Integer id) {
PlanPeople planPeople = planPeopleMapper.selectById(id);
Integer planId = planPeople.getPlanId();
PlanTraining planTraining = planTrainingMapper.selectById(planId);
HistoryArchives historyArchives = new HistoryArchives();
historyArchives.setCreateTime(LocalDateTime.now())
.setTime(planTraining.getStartTime())
.setType(planTraining.getContent())
.setContent(planTraining.getObjective())
.setUserId(planPeople.getUserId());
if (planPeople!=null) {
Integer planId = planPeople.getPlanId();
PlanTraining planTraining = planTrainingMapper.selectById(planId);
if (planTraining!=null){
HistoryArchives historyArchives = new HistoryArchives();
historyArchives.setCreateTime(LocalDateTime.now())
.setTime(planTraining.getStartTime())
.setType(planTraining.getContent())
.setContent(planTraining.getObjective())
.setUserId(planPeople.getUserId());
historyArchivesMapper.insert(historyArchives);
historyArchivesMapper.insert(historyArchives);
return BaseResponse.okData("同步成功");
return BaseResponse.okData("同步成功");
}
else {
return BaseResponse.errorMsg("该数据不存在,请重新输入正确的数据");
}
}
else {
return BaseResponse.errorMsg("该数据不存在,请输入正确的数据");
}
}
}
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