|
@@ -191,6 +191,17 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
String person = param.getPerson();
|
|
|
//先删除原明细,再插入新明细
|
|
|
deleteMapping(questionInfo.getId(), param);//删除原映射关系
|
|
|
+ if (InsertOrUpdateEnum.Update.getKey() == param.getInsertOrUpdate()
|
|
|
+ && TagTypeEnum.T6.getKey() == questionWrapper.getTagType()) {
|
|
|
+ // 如果是既往史类型,考虑到整一列内容清空,原tagType=10下的映射关系就会遗留下来,
|
|
|
+ // 变成脏数据,导致删除标签时报错
|
|
|
+ // 将tagType=10下的所有映射关系删除
|
|
|
+ Map<String, Object> map = new HashMap();
|
|
|
+ map.put("id", questionInfo.getId());
|
|
|
+ map.put("date", param.getNow());
|
|
|
+ map.put("person", param.getPerson());
|
|
|
+ deleteTagType10Mapping(map);
|
|
|
+ }
|
|
|
List<QuestionMappingWrapper> questionMappings = questionWrapper.getQuestionMappings();
|
|
|
if (ListUtil.isNotEmpty(questionMappings)) {
|
|
|
for (QuestionMappingWrapper bean : questionMappings) {
|
|
@@ -512,11 +523,6 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
|
|
|
// 映射关系删除校验,如果有父项关联,不能删除
|
|
|
List<QuestionInfo> questionInfoList = getParentQuestion(Long.parseLong(id));
|
|
|
- for (QuestionInfo questionInfo : questionInfoList) {
|
|
|
- if (questionInfo.getTagType().equals(TagTypeEnum.T10.getKey())) {
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
if (ListUtil.isNotEmpty(questionInfoList)) {
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
sb.append("请先删除上级关联:");
|