|
@@ -6,11 +6,13 @@ import com.fs.common.core.domain.AjaxResult;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
|
|
+import com.fs.his.domain.FsChineseMedicine;
|
|
|
import com.fs.live.domain.LiveSensitiveWords;
|
|
import com.fs.live.domain.LiveSensitiveWords;
|
|
|
import com.fs.live.service.ILiveSensitiveWordsService;
|
|
import com.fs.live.service.ILiveSensitiveWordsService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
@@ -95,4 +97,22 @@ public class LiveSensitiveWordsController extends BaseController
|
|
|
{
|
|
{
|
|
|
return toAjax(liveSensitiveWordsService.deleteLiveSensitiveWordsByWordIds(wordIds));
|
|
return toAjax(liveSensitiveWordsService.deleteLiveSensitiveWordsByWordIds(wordIds));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/importTemplate")
|
|
|
|
|
+ public AjaxResult importTemplate()
|
|
|
|
|
+ {
|
|
|
|
|
+ ExcelUtil<LiveSensitiveWords> util = new ExcelUtil<>(LiveSensitiveWords.class);
|
|
|
|
|
+ return util.importTemplateExcel("导入模板");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @Log(title = "导入", businessType = BusinessType.IMPORT)
|
|
|
|
|
+ @PostMapping("/importData")
|
|
|
|
|
+ public AjaxResult importData(MultipartFile file) throws Exception
|
|
|
|
|
+ {
|
|
|
|
|
+ ExcelUtil<LiveSensitiveWords> util = new ExcelUtil<>(LiveSensitiveWords.class);
|
|
|
|
|
+ List<LiveSensitiveWords> list = util.importExcel(file.getInputStream());
|
|
|
|
|
+ String message = liveSensitiveWordsService.importData(list);
|
|
|
|
|
+ return AjaxResult.success(message);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|