|
@@ -57,7 +57,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
|
|
|
@Autowired
|
|
|
private TrainingDemandTempBackupsServiceImpl trainingDemandTempBackupsServiceImpl;
|
|
|
@Autowired
|
|
|
- private UserDemandSurveyServiceImpl userDemandSurveyServiceImpl;
|
|
|
+ private DemandSurveyContentContentServiceImpl demandSurveyContentServiceImpl;
|
|
|
|
|
|
@Autowired
|
|
|
private TraningCommonDao traningCommonDao;
|
|
@@ -80,7 +80,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
|
|
|
log.error("调查问卷 :{}已发布无法再次发布", trainingDemandSurveyDo.getName());
|
|
|
return R.error("调查问卷已发布");
|
|
|
}
|
|
|
- List<UserDemandSurveyDo> saveUserDemandSurveyDos = new ArrayList<>();
|
|
|
+ List<DemandSurveyContentDo> saveDemandSurveyContentDos = new ArrayList<>();
|
|
|
/******************************获取参与此次问卷的用户信息*********************************************/
|
|
|
Set<String> participantUserId = getParticipantUser(trainingDemandSurveyDo);
|
|
|
log.info("参与本次温泉调查的员工数为:{}", participantUserId.size());
|
|
@@ -121,7 +121,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
|
|
|
List<TrainingDemandTempBackupsDo> saveDemandTempBackupsDo = new ArrayList<>();
|
|
|
int num = 1;
|
|
|
int questionNum= 1;
|
|
|
- UserDemandSurveyDo addDemandSurveyDo;
|
|
|
+ DemandSurveyContentDo addDemandSurveyDo;
|
|
|
for (int i = 0; i < surveyTempDetailDos.size(); i++) {
|
|
|
/************ 问卷调查模板内容备份*************/
|
|
|
TrainingDemandSurveyTempDetailDo surveyTempDetail = surveyTempDetailDos.get(i);
|
|
@@ -164,13 +164,13 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
|
|
|
});
|
|
|
saveDemandQuestionOptionBackupsDos.addAll(addOptions);
|
|
|
// 生成用户问卷
|
|
|
- saveUserDemandSurveyDos.add(generateUserDemandSurvey(num, questionBackupsDo, trainingDemandTempBackupsDo,
|
|
|
+ saveDemandSurveyContentDos.add(generateUserDemandSurvey(num, questionBackupsDo, trainingDemandTempBackupsDo,
|
|
|
saveDemandSurveyBackupsDo, addOptions));
|
|
|
num++;
|
|
|
}
|
|
|
}
|
|
|
for (int k = 0; k < saveDemandSurveyCustomDetailBackupsDos.size(); k++) {
|
|
|
- addDemandSurveyDo = new UserDemandSurveyDo();
|
|
|
+ addDemandSurveyDo = new DemandSurveyContentDo();
|
|
|
addDemandSurveyDo.setId(SecurityUtil.getUUID());
|
|
|
addDemandSurveyDo.setNum(num);
|
|
|
addDemandSurveyDo.setSurverid(saveDemandSurveyBackupsDo.getId());
|
|
@@ -178,13 +178,13 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
|
|
|
addDemandSurveyDo.setQuestionid(saveDemandSurveyCustomDetailBackupsDos.get(k).getId());
|
|
|
addDemandSurveyDo.setQuestionname(saveDemandSurveyCustomDetailBackupsDos.get(k).getContent());
|
|
|
addDemandSurveyDo.setQuestiontype(saveDemandSurveyCustomDetailBackupsDos.get(k).getQuestiontype());
|
|
|
- saveUserDemandSurveyDos.add(addDemandSurveyDo);
|
|
|
+ saveDemandSurveyContentDos.add(addDemandSurveyDo);
|
|
|
num++;
|
|
|
}
|
|
|
// 数据存表
|
|
|
saveData(saveDemandSurveyBackupsDo, saveDemandSurveyCustomDetailBackupsDos,
|
|
|
saveDemandQuestionBackupsDos, saveDemandQuestionOptionBackupsDos,
|
|
|
- saveUserDemandSurveyDos, saveDemandTempBackupsDo, trainingDemandSurveyDo);
|
|
|
+ saveDemandSurveyContentDos, saveDemandTempBackupsDo, trainingDemandSurveyDo);
|
|
|
return R.ok();
|
|
|
}
|
|
|
|
|
@@ -195,7 +195,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
|
|
|
* @param saveDemandSurveyCustomDetailBackupsDos 培训内容自定义调查表
|
|
|
* @param saveDemandQuestionBackupsDos
|
|
|
* @param saveDemandQuestionOptionBackupsDos
|
|
|
- * @param saveUserDemandSurveyDos
|
|
|
+ * @param saveDemandSurveyContentDos
|
|
|
* @param saveDemandTempBackupsDo
|
|
|
*/
|
|
|
@Transactional
|
|
@@ -203,7 +203,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
|
|
|
List<TrainingDemandSurveyCustomDetailBackupsDo> saveDemandSurveyCustomDetailBackupsDos,
|
|
|
List<TrainingDemandQuestionBackupsDo> saveDemandQuestionBackupsDos,
|
|
|
List<TrainingDemandQuestionOptionBackupsDo> saveDemandQuestionOptionBackupsDos,
|
|
|
- List<UserDemandSurveyDo> saveUserDemandSurveyDos,
|
|
|
+ List<DemandSurveyContentDo> saveDemandSurveyContentDos,
|
|
|
List<TrainingDemandTempBackupsDo> saveDemandTempBackupsDo,
|
|
|
TrainingDemandSurveyDo trainingDemandSurveyDo) {
|
|
|
trainingDemandQuestionBackupsServiceImpl.saveOrUpdateBatch(saveDemandQuestionBackupsDos);
|
|
@@ -211,7 +211,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
|
|
|
trainingDemandSurveyBackupsServiceImpl.saveOrUpdate(saveDemandSurveyBackupsDo);
|
|
|
trainingDemandSurveyCustomDetailBackupsServiceImpl.saveOrUpdateBatch(saveDemandSurveyCustomDetailBackupsDos);
|
|
|
trainingDemandTempBackupsServiceImpl.saveOrUpdateBatch(saveDemandTempBackupsDo);
|
|
|
- userDemandSurveyServiceImpl.saveOrUpdateBatch(saveUserDemandSurveyDos);
|
|
|
+ demandSurveyContentServiceImpl.saveOrUpdateBatch(saveDemandSurveyContentDos);
|
|
|
trainingDemandSurveyDo.setState(RELEASE);
|
|
|
trainingDemandSurveyDo.setReleasetime(new Date());
|
|
|
trainingDemandSurveyDao.updateById(trainingDemandSurveyDo);
|
|
@@ -222,12 +222,12 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- private UserDemandSurveyDo generateUserDemandSurvey(int num,
|
|
|
- TrainingDemandQuestionBackupsDo questionBackupsDo,
|
|
|
- TrainingDemandTempBackupsDo trainingDemandTempBackupsDo,
|
|
|
- TrainingDemandSurveyBackupsDo trainingDemandSurveyBackupsDo,
|
|
|
- List<TrainingDemandQuestionOptionBackupsDo> addOptions) {
|
|
|
- UserDemandSurveyDo demandSurveyDo = new UserDemandSurveyDo();
|
|
|
+ private DemandSurveyContentDo generateUserDemandSurvey(int num,
|
|
|
+ TrainingDemandQuestionBackupsDo questionBackupsDo,
|
|
|
+ TrainingDemandTempBackupsDo trainingDemandTempBackupsDo,
|
|
|
+ TrainingDemandSurveyBackupsDo trainingDemandSurveyBackupsDo,
|
|
|
+ List<TrainingDemandQuestionOptionBackupsDo> addOptions) {
|
|
|
+ DemandSurveyContentDo demandSurveyDo = new DemandSurveyContentDo();
|
|
|
demandSurveyDo.setId(SecurityUtil.getUUID());
|
|
|
demandSurveyDo.setNum(num);
|
|
|
demandSurveyDo.setSurverid(trainingDemandSurveyBackupsDo.getId());
|