|
@@ -96,9 +96,9 @@ public class ReplacementInstrumentActivityServiceImpl extends BaseServiceImpl<In
|
|
|
sysUserFeignService.updateSysUser(sysUser);
|
|
|
}
|
|
|
}
|
|
|
- ReplacementInstrumentCooperation replacementInstrumentCooperation = replacementInstrumentCooperationDao.getByCooperationId(replacementInstrumentActivity.getCooperationOrganId());
|
|
|
+ ReplacementInstrumentCooperation replacementInstrumentCooperation = replacementInstrumentCooperationDao.get(replacementInstrumentActivity.getReplacementInstrumentCooperationId());
|
|
|
//如果提交过调查问卷,那么覆盖之前的记录
|
|
|
- ReplacementInstrumentActivity activity = replacementInstrumentActivityDao.findByUserId(replacementInstrumentActivity.getCooperationOrganId(), sysUser.getId(),replacementInstrumentCooperation.getTopicId());
|
|
|
+ ReplacementInstrumentActivity activity = replacementInstrumentActivityDao.findByUserId(replacementInstrumentActivity.getCooperationOrganId(), sysUser.getId(),replacementInstrumentCooperation.getId());
|
|
|
if (replacementInstrumentCooperation != null && replacementInstrumentCooperation.getOpenPay().equals(YesOrNoEnum.YES)) {
|
|
|
replacementInstrumentActivity.setOpenFlag(1);
|
|
|
}
|
|
@@ -147,8 +147,8 @@ public class ReplacementInstrumentActivityServiceImpl extends BaseServiceImpl<In
|
|
|
}
|
|
|
replacementInstrumentActivity.setUserId(sysUser.getId());
|
|
|
//如果用户是43分部,那么修改用户信息
|
|
|
+ CooperationOrgan cooperationOrgan = cooperationOrganService.get(replacementInstrumentActivity.getCooperationOrganId());
|
|
|
if (sysUser.getOrganId() == 43) {
|
|
|
- CooperationOrgan cooperationOrgan = cooperationOrganService.get(replacementInstrumentActivity.getCooperationOrganId());
|
|
|
if (cooperationOrgan != null) {
|
|
|
sysUser.setOrganId(cooperationOrgan.getOrganId());
|
|
|
sysUser.setUpdateTime(new Date());
|
|
@@ -156,9 +156,9 @@ public class ReplacementInstrumentActivityServiceImpl extends BaseServiceImpl<In
|
|
|
}
|
|
|
}
|
|
|
Integer topicId = replacementInstrumentActivity.getTopicId();
|
|
|
- ReplacementInstrumentCooperation replacementInstrumentCooperation = replacementInstrumentCooperationDao.getByCooperationId(replacementInstrumentActivity.getCooperationOrganId());
|
|
|
+ ReplacementInstrumentCooperation replacementInstrumentCooperation = replacementInstrumentCooperationDao.get(replacementInstrumentActivity.getReplacementInstrumentCooperationId());
|
|
|
//如果提交过调查问卷,那么覆盖之前的记录
|
|
|
- ReplacementInstrumentActivity activity = replacementInstrumentActivityDao.findByUserId(replacementInstrumentActivity.getCooperationOrganId(), sysUser.getId(),replacementInstrumentCooperation.getTopicId());
|
|
|
+ ReplacementInstrumentActivity activity = replacementInstrumentActivityDao.findByUserId(replacementInstrumentActivity.getCooperationOrganId(), sysUser.getId(),replacementInstrumentCooperation.getId());
|
|
|
if (replacementInstrumentCooperation != null && replacementInstrumentCooperation.getOpenPay().equals(YesOrNoEnum.YES)) {
|
|
|
replacementInstrumentActivity.setOpenFlag(1);
|
|
|
}
|
|
@@ -209,8 +209,8 @@ public class ReplacementInstrumentActivityServiceImpl extends BaseServiceImpl<In
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ReplacementInstrumentActivity findByUserId(Integer cooperationOrganId, Integer userId,Integer topicId) {
|
|
|
- return replacementInstrumentActivityDao.findByUserId(cooperationOrganId, userId,topicId);
|
|
|
+ public ReplacementInstrumentActivity findByUserId(Integer cooperationOrganId, Integer userId,Integer cooperationId) {
|
|
|
+ return replacementInstrumentActivityDao.findByUserId(cooperationOrganId, userId,cooperationId);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -439,7 +439,7 @@ public class ReplacementInstrumentActivityServiceImpl extends BaseServiceImpl<In
|
|
|
public ReplacementInstrumentActivityStatDto getInfo(Integer id) {
|
|
|
ReplacementInstrumentActivityStatDto info = replacementInstrumentActivityDao.getInfo(id);
|
|
|
if (info != null && info.getOpenFlag().equals(0)) {
|
|
|
- ReplacementInstrumentCooperation byCooperationId = replacementInstrumentCooperationDao.getByCooperationId(info.getCooperationOrganId());
|
|
|
+ ReplacementInstrumentCooperation byCooperationId = replacementInstrumentCooperationDao.get(info.getReplacementInstrumentCooperationId());
|
|
|
if (byCooperationId != null && byCooperationId.getOpenPay().equals(YesOrNoEnum.YES)) {
|
|
|
info.setOpenFlag(1);
|
|
|
}
|
|
@@ -496,11 +496,13 @@ public class ReplacementInstrumentActivityServiceImpl extends BaseServiceImpl<In
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ReplacementInstrumentActivity queryUserInfo(Integer cooperationOrganId,SysUser user,Integer topicId) {
|
|
|
- ReplacementInstrumentActivity replacementInstrumentActivity = findByUserId(cooperationOrganId, user.getId(),topicId);
|
|
|
+ public ReplacementInstrumentActivity queryUserInfo(Integer cooperationOrganId,SysUser user,Integer cooperationId) {
|
|
|
+ ReplacementInstrumentActivity replacementInstrumentActivity = findByUserId(cooperationOrganId, user.getId(),cooperationId);
|
|
|
+ ReplacementInstrumentCooperation cooperation = replacementInstrumentCooperationDao.get(cooperationId);
|
|
|
if (replacementInstrumentActivity == null) {
|
|
|
Student student = studentService.get(user.getId());
|
|
|
replacementInstrumentActivity = new ReplacementInstrumentActivity();
|
|
|
+
|
|
|
replacementInstrumentActivity.setUserId(user.getId());
|
|
|
replacementInstrumentActivity.setClasses(student.getCurrentClass());
|
|
|
if (student.getCurrentGradeNum() != null) {
|
|
@@ -512,14 +514,15 @@ public class ReplacementInstrumentActivityServiceImpl extends BaseServiceImpl<In
|
|
|
if (StringUtils.isNotEmpty(subjectIdList)) {
|
|
|
replacementInstrumentActivity.setSubjectId(Integer.parseInt(subjectIdList.split(",")[0]));
|
|
|
}
|
|
|
+ replacementInstrumentActivity.setTopicId(cooperation.getTopicId());
|
|
|
+ replacementInstrumentActivity.setReplacementInstrumentCooperationId(cooperationId);
|
|
|
}
|
|
|
replacementInstrumentActivity.setMobileNo(user.getPhone());
|
|
|
CooperationOrgan cooperationOrgan = cooperationOrganService.get(cooperationOrganId);
|
|
|
if (cooperationOrgan != null) {
|
|
|
replacementInstrumentActivity.setCooperationOrganName(cooperationOrgan.getName());
|
|
|
}
|
|
|
- ReplacementInstrumentCooperation replacementInstrumentCooperation = replacementInstrumentCooperationDao.getByCooperationId(cooperationOrganId);
|
|
|
- replacementInstrumentActivity.setShowQuestion(replacementInstrumentCooperation.getShowQuestion());
|
|
|
+ replacementInstrumentActivity.setShowQuestion(cooperation.getShowQuestion());
|
|
|
return replacementInstrumentActivity;
|
|
|
}
|
|
|
}
|