|
@ -27,6 +27,7 @@ import com.epmet.dto.form.CustomerFormQueryDTO; |
|
|
import com.epmet.dto.form.EditIFormItemFormDTO; |
|
|
import com.epmet.dto.form.EditIFormItemFormDTO; |
|
|
import com.epmet.dto.result.*; |
|
|
import com.epmet.dto.result.*; |
|
|
import com.epmet.entity.IcFormItemEntity; |
|
|
import com.epmet.entity.IcFormItemEntity; |
|
|
|
|
|
import com.epmet.entity.IcFormItemOptionsEntity; |
|
|
import com.epmet.service.IcFormItemService; |
|
|
import com.epmet.service.IcFormItemService; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
@ -187,17 +188,24 @@ public class IcFormItemServiceImpl extends BaseServiceImpl<IcFormItemDao, IcForm |
|
|
entity.setItemType(formDTO.getItemType()); |
|
|
entity.setItemType(formDTO.getItemType()); |
|
|
baseDao.updateById(entity); |
|
|
baseDao.updateById(entity); |
|
|
if (!CollectionUtils.isEmpty(formDTO.getOptions())) { |
|
|
if (!CollectionUtils.isEmpty(formDTO.getOptions())) { |
|
|
//todo
|
|
|
icFormItemOptionsDao.deleteByItemId(entity.getId(), entity.getCustomerId()); |
|
|
// 先删除后新增
|
|
|
int sort = 1; |
|
|
/*int sort=1; |
|
|
|
|
|
for (OptionDTO optionDTO : formDTO.getOptions()) { |
|
|
for (OptionDTO optionDTO : formDTO.getOptions()) { |
|
|
IcFormItemOptionsEntity optionsEntity = new IcFormItemOptionsEntity(); |
|
|
IcFormItemOptionsEntity optionsEntity = new IcFormItemOptionsEntity(); |
|
|
optionsEntity.setCustomerId(); |
|
|
optionsEntity.setCustomerId(entity.getCustomerId()); |
|
|
|
|
|
optionsEntity.setFormCode(entity.getFormCode()); |
|
|
}*/ |
|
|
optionsEntity.setFormId(entity.getFormId()); |
|
|
|
|
|
optionsEntity.setItemId(entity.getId()); |
|
|
|
|
|
optionsEntity.setOptionLabel(optionDTO.getLabel()); |
|
|
|
|
|
optionsEntity.setOptionValue(optionDTO.getValue()); |
|
|
|
|
|
optionsEntity.setSort(sort); |
|
|
|
|
|
icFormItemOptionsDao.insert(optionsEntity); |
|
|
|
|
|
sort++; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|