Merge branch 'youxilong_2.26_院后第一增量' of http://192.168.16.64:3000/jihan/PostDischargePatientManage into youxilong_2.26_院后第一增量

This commit is contained in:
youxilong 2024-03-06 17:58:50 +08:00
commit f71b0b426a
16 changed files with 150 additions and 33 deletions

View File

@ -99,7 +99,7 @@ public class AgencyController extends BaseController {
@Log(title = "机构信息", businessType = BusinessType.UPDATE) @Log(title = "机构信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody Agency agency) { public AjaxResult edit(@RequestBody Agency agency) {
return toAjax(agencyService.updateAgency(agency)); return agencyService.updateAgency(agency);
} }
/** /**

View File

@ -52,6 +52,14 @@ public class DepartmentController extends BaseController {
return AjaxResult.success(departmentService.selectDepartmentList(department)); return AjaxResult.success(departmentService.selectDepartmentList(department));
} }
/**
* 查询科室信息列表 问卷使用
*/
@GetMapping("/selectUserDepartment")
public AjaxResult selectUserDepartment() {
return departmentService.selectUserDepartment();
}
/** /**
* 查询科室或病区信息列表 不分页 * 查询科室或病区信息列表 不分页
*/ */

View File

@ -38,6 +38,14 @@ public class DepartmentDiseaseTypeController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询科室病种信息列表 不分页 问卷使用
*/
@GetMapping("/diseaseList")
public AjaxResult diseaseList(DepartmentDiseaseType departmentDiseaseType) {
return AjaxResult.success(departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType));
}
/** /**
* 导出科室病种信息列表 * 导出科室病种信息列表
*/ */

View File

@ -66,11 +66,11 @@ public class QuestionInfoController extends BaseController {
} }
/** /**
* 新增问卷基本信息 * 新增问卷信息
*/ */
@PreAuthorize("@ss.hasPermi('system:question:add')") @PreAuthorize("@ss.hasPermi('system:question:add')")
@Log(title = "问卷基本信息", businessType = BusinessType.INSERT) @Log(title = "问卷基本信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping("/add")
public AjaxResult add(@RequestBody QuestionVO questionInfo) { public AjaxResult add(@RequestBody QuestionVO questionInfo) {
if (Objects.isNull(questionInfo) || StringUtils.isBlank(questionInfo.getQuestionnaireName())) { if (Objects.isNull(questionInfo) || StringUtils.isBlank(questionInfo.getQuestionnaireName())) {
return AjaxResult.error("请添加问卷信息!"); return AjaxResult.error("请添加问卷信息!");
@ -79,11 +79,11 @@ public class QuestionInfoController extends BaseController {
} }
/** /**
* 修改问卷基本信息 * 修改问卷信息
*/ */
@PreAuthorize("@ss.hasPermi('system:question:edit')") @PreAuthorize("@ss.hasPermi('system:question:edit')")
@Log(title = "问卷基本信息", businessType = BusinessType.UPDATE) @Log(title = "问卷基本信息", businessType = BusinessType.UPDATE)
@PutMapping @PostMapping("/edit")
public AjaxResult edit(@RequestBody QuestionVO question) { public AjaxResult edit(@RequestBody QuestionVO question) {
return questionInfoService.updateQuestionInfo(question); return questionInfoService.updateQuestionInfo(question);
} }
@ -97,4 +97,12 @@ public class QuestionInfoController extends BaseController {
public AjaxResult remove(@PathVariable Long id) { public AjaxResult remove(@PathVariable Long id) {
return toAjax(questionInfoService.deleteQuestionInfoById(id)); return toAjax(questionInfoService.deleteQuestionInfoById(id));
} }
/**
* 修改问卷基本信息
*/
@PostMapping("/updateQuestion")
public AjaxResult updateQuestionByDepartment(QuestionInfo questionInfo) {
return questionInfoService.updateQuestionByDepartment(questionInfo);
}
} }

View File

@ -44,7 +44,7 @@ public class QuestionSubject extends BaseEntity {
*/ */
@ApiModelProperty(value = "题目序号") @ApiModelProperty(value = "题目序号")
@Excel(name = "题目序号") @Excel(name = "题目序号")
private Integer questionNumber; private BigDecimal questionNumber;
/** /**
* 题目类型单选题MULTIPLE_CHOICE多选题MULTIPLE_CHOICE_QUESTIONS填空题FILL_IN_THE_BLANKS打分题SCORING_QUESTIONS * 题目类型单选题MULTIPLE_CHOICE多选题MULTIPLE_CHOICE_QUESTIONS填空题FILL_IN_THE_BLANKS打分题SCORING_QUESTIONS
@ -95,7 +95,7 @@ public class QuestionSubject extends BaseEntity {
*/ */
@ApiModelProperty(value = "是否计分01") @ApiModelProperty(value = "是否计分01")
@Excel(name = "是否计分01") @Excel(name = "是否计分01")
private Integer whetherScore; private Boolean whetherScore;
/** /**
* 计分方式每个选项都有对应分值NOT_UNIQUE_ANSWER全部答对才得分UNIQUE_ANSWER * 计分方式每个选项都有对应分值NOT_UNIQUE_ANSWER全部答对才得分UNIQUE_ANSWER

View File

@ -84,5 +84,5 @@ public interface QuestionSubjectOptionMapper {
* @param questionSubjectIds 题目表id * @param questionSubjectIds 题目表id
* @return int * @return int
*/ */
int deleteOptionByQuestionSubjectIds(List<Long> questionSubjectIds); int deleteOptionByQuestionSubjectIds(@Param("questionSubjectIds") List<Long> questionSubjectIds);
} }

View File

@ -61,7 +61,7 @@ public interface IAgencyService {
* @param agency 机构信息 * @param agency 机构信息
* @return 结果 * @return 结果
*/ */
int updateAgency(Agency agency); AjaxResult updateAgency(Agency agency);
/** /**
* 批量删除机构信息 * 批量删除机构信息

View File

@ -4,7 +4,6 @@ import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.common.utils.regex.RegexUtil; import com.xinelu.common.utils.regex.RegexUtil;
import com.xinelu.manage.domain.agency.Agency; import com.xinelu.manage.domain.agency.Agency;
@ -16,14 +15,12 @@ import com.xinelu.manage.vo.agency.AgencyVO;
import com.xinelu.manage.vo.sysarea.SysAreaVO; import com.xinelu.manage.vo.sysarea.SysAreaVO;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -126,10 +123,20 @@ public class AgencyServiceImpl implements IAgencyService {
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateAgency(Agency agency) { public AjaxResult updateAgency(Agency agency) {
if (Objects.isNull(agency.getId())) {
return AjaxResult.error("请选择机构信息!");
}
Agency dataAgency = agencyMapper.selectAgencyById(agency.getId());
if (StringUtils.isNotBlank(dataAgency.getAgencyName()) && !agency.getAgencyName().equals(dataAgency.getAgencyName())) {
int i = agencyMapper.selectAgencyNameByAgencyNameInt(agency.getAgencyName());
if (i > 0) {
throw new ServiceException("该名称" + agency.getAgencyName() + "以重复!");
}
}
agency.setUpdateTime(DateUtils.getNowDate()); agency.setUpdateTime(DateUtils.getNowDate());
agency.setUpdateBy(SecurityUtils.getUsername()); agency.setUpdateBy(SecurityUtils.getUsername());
return agencyMapper.updateAgencyById(agency); return AjaxResult.success(agencyMapper.updateAgencyById(agency));
} }
/** /**
@ -251,7 +258,7 @@ public class AgencyServiceImpl implements IAgencyService {
Iterator<AgencyVO> it = list.iterator(); Iterator<AgencyVO> it = list.iterator();
while (it.hasNext()) { while (it.hasNext()) {
AgencyVO n = (AgencyVO) it.next(); AgencyVO n = (AgencyVO) it.next();
if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getId().longValue()) { if (Objects.nonNull(n.getParentId()) && n.getParentId().longValue() == t.getId().longValue()) {
tlist.add(n); tlist.add(n);
} }
} }

View File

@ -32,6 +32,13 @@ public interface IDepartmentService {
*/ */
List<Department> selectDepartmentList(Department department); List<Department> selectDepartmentList(Department department);
/**
* 查询科室信息列表 问卷使用
*
* @return 科室信息集合
*/
AjaxResult selectUserDepartment();
/** /**
* 查询科室或病区信息列表 不分页 * 查询科室或病区信息列表 不分页
* *
@ -114,6 +121,7 @@ public interface IDepartmentService {
/** /**
* 查询科室信息列表及包含服务包数量 * 查询科室信息列表及包含服务包数量
*
* @param departmentDto * @param departmentDto
* @return * @return
*/ */

View File

@ -1,6 +1,7 @@
package com.xinelu.manage.service.department.impl; package com.xinelu.manage.service.department.impl;
import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.domain.entity.SysUser;
import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.SecurityUtils;
@ -13,6 +14,7 @@ import com.xinelu.manage.mapper.department.DepartmentMapper;
import com.xinelu.manage.service.department.IDepartmentService; import com.xinelu.manage.service.department.IDepartmentService;
import com.xinelu.manage.vo.department.DepartmentListVO; import com.xinelu.manage.vo.department.DepartmentListVO;
import com.xinelu.manage.vo.department.DepartmentVO; import com.xinelu.manage.vo.department.DepartmentVO;
import com.xinelu.system.mapper.SysUserMapper;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.BooleanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -38,6 +40,8 @@ public class DepartmentServiceImpl implements IDepartmentService {
private DepartmentMapper departmentMapper; private DepartmentMapper departmentMapper;
@Resource @Resource
private RegexUtil regexUtil; private RegexUtil regexUtil;
@Resource
private SysUserMapper sysUserMapper;
/** /**
* 查询科室信息 * 查询科室信息
@ -61,6 +65,23 @@ public class DepartmentServiceImpl implements IDepartmentService {
return departmentMapper.selectDepartmentList(department); return departmentMapper.selectDepartmentList(department);
} }
/**
* 查询科室信息列表 问卷使用
*
* @return 科室信息集合
*/
@Override
public AjaxResult selectUserDepartment() {
SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId());
List<Department> departments = new ArrayList<>();
if (Objects.nonNull(sysUser) && Objects.nonNull(sysUser.getAgencyId())) {
Department department = new Department();
department.setAgencyId(sysUser.getAgencyId());
departments = departmentMapper.selectDepartmentList(department);
}
return AjaxResult.success(departments);
}
/** /**
* 查询科室或病区信息列表 不分页 * 查询科室或病区信息列表 不分页
* *

View File

@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
@ -44,6 +45,9 @@ public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeS
*/ */
@Override @Override
public List<DepartmentDiseaseType> selectDepartmentDiseaseTypeList(DepartmentDiseaseType departmentDiseaseType) { public List<DepartmentDiseaseType> selectDepartmentDiseaseTypeList(DepartmentDiseaseType departmentDiseaseType) {
if (Objects.isNull(departmentDiseaseType) || Objects.isNull(departmentDiseaseType.getDepartmentId())) {
return new ArrayList<>();
}
return departmentDiseaseTypeMapper.selectDepartmentDiseaseTypeList(departmentDiseaseType); return departmentDiseaseTypeMapper.selectDepartmentDiseaseTypeList(departmentDiseaseType);
} }

View File

@ -61,4 +61,12 @@ public interface IQuestionInfoService {
* @return 结果 * @return 结果
*/ */
int deleteQuestionInfoById(Long id); int deleteQuestionInfoById(Long id);
/**
* 修改问卷基本信息
*
* @param questionInfo 问卷基本信息
* @return 结果
*/
AjaxResult updateQuestionByDepartment(QuestionInfo questionInfo);
} }

View File

@ -102,8 +102,8 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
List<QuestionSubjectVO> questionSubjectList = question.getQuestionSubjectList(); List<QuestionSubjectVO> questionSubjectList = question.getQuestionSubjectList();
List<QuestionSubject> questionSubjects = new ArrayList<>(); List<QuestionSubject> questionSubjects = new ArrayList<>();
List<QuestionSubjectOptionVO> questionSubjectOptions = new ArrayList<>(); List<QuestionSubjectOptionVO> questionSubjectOptions = new ArrayList<>();
QuestionSubject saveQuestionSubject = new QuestionSubject();
for (QuestionSubjectVO questionSubject : questionSubjectList) { for (QuestionSubjectVO questionSubject : questionSubjectList) {
QuestionSubject saveQuestionSubject = new QuestionSubject();
BeanUtils.copyBeanProp(saveQuestionSubject, questionSubject); BeanUtils.copyBeanProp(saveQuestionSubject, questionSubject);
saveQuestionSubject.setQuestionInfoId(questionInfo.getId()); saveQuestionSubject.setQuestionInfoId(questionInfo.getId());
saveQuestionSubject.setCreateTime(DateUtils.getNowDate()); saveQuestionSubject.setCreateTime(DateUtils.getNowDate());
@ -118,14 +118,14 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
} }
//新增选项表 //新增选项表
List<QuestionSubjectOption> saveQuestionSubjectOptions = new ArrayList<>(); List<QuestionSubjectOption> saveQuestionSubjectOptions = new ArrayList<>();
QuestionSubjectOption saveQuestionSubjectOption = new QuestionSubjectOption();
for (QuestionSubjectOptionVO questionSubjectOption : questionSubjectOptions) { for (QuestionSubjectOptionVO questionSubjectOption : questionSubjectOptions) {
QuestionSubjectOption saveQuestionSubjectOption = new QuestionSubjectOption();
BeanUtils.copyBeanProp(saveQuestionSubjectOption, questionSubjectOption); BeanUtils.copyBeanProp(saveQuestionSubjectOption, questionSubjectOption);
QuestionSubject questionSubject = questionSubjects.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionNumber()) && questionSubjectOption.getQuestionNumber().equals(item.getQuestionNumber())).findFirst().orElse(new QuestionSubject()); QuestionSubject questionSubject = questionSubjects.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionNumber()) && questionSubjectOption.getQuestionNumber().compareTo(item.getQuestionNumber()) == 0).findFirst().orElse(new QuestionSubject());
questionSubjectOption.setQuestionnaireSubjectId(questionSubject.getId()); saveQuestionSubjectOption.setQuestionnaireSubjectId(questionSubject.getId());
saveQuestionSubjectOption.setCreateTime(DateUtils.getNowDate()); saveQuestionSubjectOption.setCreateTime(DateUtils.getNowDate());
saveQuestionSubjectOption.setCreateBy(SecurityUtils.getUsername()); saveQuestionSubjectOption.setCreateBy(SecurityUtils.getUsername());
saveQuestionSubjectOptions.add(questionSubjectOption); saveQuestionSubjectOptions.add(saveQuestionSubjectOption);
} }
int subjectOptionCount = questionSubjectOptionMapper.insertQuestionSubjectOptionList(saveQuestionSubjectOptions); int subjectOptionCount = questionSubjectOptionMapper.insertQuestionSubjectOptionList(saveQuestionSubjectOptions);
if (subjectOptionCount <= 0) { if (subjectOptionCount <= 0) {
@ -173,8 +173,8 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
List<QuestionSubjectVO> questionSubjectList = question.getQuestionSubjectList(); List<QuestionSubjectVO> questionSubjectList = question.getQuestionSubjectList();
List<QuestionSubject> questionSubjects = new ArrayList<>(); List<QuestionSubject> questionSubjects = new ArrayList<>();
List<QuestionSubjectOptionVO> questionSubjectOptions = new ArrayList<>(); List<QuestionSubjectOptionVO> questionSubjectOptions = new ArrayList<>();
QuestionSubject saveQuestionSubject = new QuestionSubject();
for (QuestionSubjectVO questionSubject : questionSubjectList) { for (QuestionSubjectVO questionSubject : questionSubjectList) {
QuestionSubject saveQuestionSubject = new QuestionSubject();
BeanUtils.copyBeanProp(saveQuestionSubject, questionSubject); BeanUtils.copyBeanProp(saveQuestionSubject, questionSubject);
saveQuestionSubject.setQuestionInfoId(questionInfo.getId()); saveQuestionSubject.setQuestionInfoId(questionInfo.getId());
saveQuestionSubject.setCreateTime(DateUtils.getNowDate()); saveQuestionSubject.setCreateTime(DateUtils.getNowDate());
@ -188,14 +188,14 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
throw new SecurityException("修改问卷失败!请联系管理员!"); throw new SecurityException("修改问卷失败!请联系管理员!");
} }
List<QuestionSubjectOption> saveQuestionSubjectOptions = new ArrayList<>(); List<QuestionSubjectOption> saveQuestionSubjectOptions = new ArrayList<>();
QuestionSubjectOption saveQuestionSubjectOption = new QuestionSubjectOption();
for (QuestionSubjectOptionVO questionSubjectOption : questionSubjectOptions) { for (QuestionSubjectOptionVO questionSubjectOption : questionSubjectOptions) {
QuestionSubjectOption saveQuestionSubjectOption = new QuestionSubjectOption();
BeanUtils.copyBeanProp(saveQuestionSubjectOption, questionSubjectOption); BeanUtils.copyBeanProp(saveQuestionSubjectOption, questionSubjectOption);
QuestionSubject questionSubject = questionSubjects.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionNumber()) && questionSubjectOption.getQuestionNumber().equals(item.getQuestionNumber())).findFirst().orElse(new QuestionSubject()); QuestionSubject questionSubject = questionSubjects.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionNumber()) && questionSubjectOption.getQuestionNumber().compareTo(item.getQuestionNumber()) == 0).findFirst().orElse(new QuestionSubject());
questionSubjectOption.setQuestionnaireSubjectId(questionSubject.getId()); saveQuestionSubjectOption.setQuestionnaireSubjectId(questionSubject.getId());
saveQuestionSubjectOption.setCreateTime(DateUtils.getNowDate()); saveQuestionSubjectOption.setCreateTime(DateUtils.getNowDate());
saveQuestionSubjectOption.setCreateBy(SecurityUtils.getUsername()); saveQuestionSubjectOption.setCreateBy(SecurityUtils.getUsername());
saveQuestionSubjectOptions.add(questionSubjectOption); saveQuestionSubjectOptions.add(saveQuestionSubjectOption);
} }
int subjectOptionCount = questionSubjectOptionMapper.insertQuestionSubjectOptionList(saveQuestionSubjectOptions); int subjectOptionCount = questionSubjectOptionMapper.insertQuestionSubjectOptionList(saveQuestionSubjectOptions);
if (subjectOptionCount <= 0) { if (subjectOptionCount <= 0) {
@ -241,4 +241,42 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
} }
return questionInfoMapper.deleteQuestionInfoById(id); return questionInfoMapper.deleteQuestionInfoById(id);
} }
/**
* 修改问卷基本信息
*
* @param questionInfo 问卷基本信息
* @return 结果
*/
@Override
public AjaxResult updateQuestionByDepartment(QuestionInfo questionInfo) {
if (Objects.isNull(questionInfo) || Objects.isNull(questionInfo.getId())) {
return AjaxResult.success();
}
if (Objects.nonNull(questionInfo.getQuestionnaireStatus()) && "PUBLISHED".equals(questionInfo.getQuestionnaireStatus())) {
QuestionInfo dataBaseQuestion = questionInfoMapper.selectQuestionInfoById(questionInfo.getId());
if (Objects.nonNull(dataBaseQuestion) && Objects.nonNull(dataBaseQuestion.getDepartmentId()) && Objects.nonNull(questionInfo.getDiseaseTypeId())) {
int questionCount = questionInfoMapper.updateQuestionInfo(questionInfo);
if (questionCount <= 0) {
return AjaxResult.error("修改问卷失败!请联系管理员!");
}
} else {
return AjaxResult.error("请选择问卷所属的科室以及科室病种后发布!");
}
}
if (Objects.nonNull(questionInfo.getQuestionnaireStatus()) && "UNPUBLISHED".equals(questionInfo.getQuestionnaireStatus())) {
int questionCount = questionInfoMapper.updateQuestionInfo(questionInfo);
if (questionCount <= 0) {
return AjaxResult.error("修改问卷失败!请联系管理员!");
}
}
if (Objects.isNull(questionInfo.getDepartmentId()) && Objects.isNull(questionInfo.getDiseaseTypeId())) {
return AjaxResult.success();
}
int questionCount = questionInfoMapper.updateQuestionInfo(questionInfo);
if (questionCount <= 0) {
return AjaxResult.success("修改问卷失败!请联系管理员!");
}
return AjaxResult.success(questionCount);
}
} }

View File

@ -4,6 +4,8 @@ import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
/** /**
* 问卷题目选项答案对象 question_subject_option * 问卷题目选项答案对象 question_subject_option
* *
@ -17,5 +19,5 @@ public class QuestionSubjectOptionVO extends QuestionSubjectOption {
/** /**
* 题号 * 题号
*/ */
private Integer questionNumber; private BigDecimal questionNumber;
} }

View File

@ -345,7 +345,7 @@
<include refid="selectQuestionSubjectVo"/> <include refid="selectQuestionSubjectVo"/>
<where> <where>
<if test="questionInfoId != null "> <if test="questionInfoId != null ">
and question_info_id = #{id} question_info_id = #{id}
</if> </if>
</where> </where>
</select> </select>

View File

@ -228,9 +228,14 @@
</select> </select>
<delete id="deleteOptionByQuestionSubjectIds"> <delete id="deleteOptionByQuestionSubjectIds">
delete from question_subject_option where questionnaire_subject_id in delete from question_subject_option
<foreach item="id" collection="list" open="(" separator="," close=")"> <where>
#{questionSubjectIds} <if test="questionSubjectIds != null and questionSubjectIds.size() > 0">
</foreach> questionnaire_subject_id in
<foreach item="questionSubjectIds" collection="questionSubjectIds" open="(" separator="," close=")">
#{questionSubjectIds}
</foreach>
</if>
</where>
</delete> </delete>
</mapper> </mapper>