From 77d7257c02fc811a53b8d9207e4239f69c8a600c Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期四, 15 六月 2023 14:33:36 +0800 Subject: [PATCH] 题目和标签代码提交 --- smartor/src/main/java/com/smartor/domain/PatArchiveReq.java | 54 + smartor/src/main/java/com/smartor/service/IPatArchivetagService.java | 5 smartor/src/main/java/com/smartor/domain/SvyLibTopicAndOptionRes.java | 64 + smartor/src/main/java/com/smartor/service/impl/BaseTagServiceImpl.java | 2 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagcategoryController.java | 101 ++ smartor/src/main/java/com/smartor/domain/PatArchivetagAndPatientInfo.java | 85 ++ smartor/src/main/java/com/smartor/service/IBaseTagService.java | 20 smartor/src/main/java/com/smartor/mapper/BaseTagcategoryMapper.java | 66 + smartor/src/main/java/com/smartor/service/impl/PatArchivetagServiceImpl.java | 43 smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java | 87 ++ smartor/src/main/java/com/smartor/service/IBaseTagcategoryService.java | 66 + smartor/src/main/java/com/smartor/service/ISvyLibTopicService.java | 6 smartor/src/main/java/com/smartor/domain/PatArchive.java | 11 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SchemeAutofinshruleController.java | 28 smartor/src/main/resources/mapper/smartor/BaseTagcategoryMapper.xml | 144 +++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java | 4 smartor/src/main/resources/mapper/smartor/SvyLibTopicMapper.xml | 20 smartor/src/main/java/com/smartor/mapper/BaseTagMapper.java | 6 smartor/src/main/java/com/smartor/service/impl/SvyLibTopicServiceImpl.java | 106 ++ smartor/src/main/resources/mapper/smartor/BaseTagMapper.xml | 78 + smartor/src/main/java/com/smartor/domain/SvyTopicReq.java | 34 smartor/src/main/java/com/smartor/mapper/SvyLibTopicoptionMapper.java | 4 smartor/src/main/java/com/smartor/service/IPatArchiveService.java | 13 smartor/src/main/resources/mapper/smartor/SvyLibTopicoptionMapper.xml | 172 ++- smartor/src/main/java/com/smartor/domain/BaseTagcategory.java | 83 ++ smartor/src/main/java/com/smartor/mapper/PatArchiveMapper.java | 4 smartor/src/main/java/com/smartor/service/impl/BaseTagcategoryServiceImpl.java | 101 ++ smartor/src/main/java/com/smartor/domain/PatArchiveAndTag.java | 150 ++++ smartor/src/main/java/com/smartor/domain/PatArchivetag.java | 131 -- smartor/src/main/java/com/smartor/domain/SvyLibTopicRes.java | 39 + smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml | 136 ++- smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml | 29 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTopicController.java | 28 smartor/src/main/java/com/smartor/domain/PatImportInfoVO.java | 77 ++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivetagController.java | 99 ++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java | 74 + smartor/src/main/java/com/smartor/mapper/PatArchivetagMapper.java | 10 smartor/src/main/java/com/smartor/mapper/SvyLibTopicMapper.java | 5 38 files changed, 1,843 insertions(+), 342 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java index 9081ab8..dc4780f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagController.java @@ -45,7 +45,7 @@ @ApiOperation("鏌ヨ鏍囩鍒楄〃") @PreAuthorize("@ss.hasPermi('system:tag:list')") @GetMapping("/list") - public TableDataInfo list(BaseTag baseTag) { + public TableDataInfo list(@RequestBody BaseTag baseTag) { startPage(); List<BaseTag> list = baseTagService.selectBaseTagList(baseTag); return getDataTable(list); @@ -108,4 +108,6 @@ public AjaxResult remove(@PathVariable Long[] tagids) { return toAjax(baseTagService.deleteBaseTagByTagids(tagids)); } + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagcategoryController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagcategoryController.java new file mode 100644 index 0000000..55ab4f1 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseTagcategoryController.java @@ -0,0 +1,101 @@ +package com.ruoyi.web.controller.smartor; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.smartor.domain.BaseTagcategory; +import com.smartor.service.IBaseTagcategoryService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 鏍囩鍒嗙被Controller + * + * @author ruoyi + * @date 2023-06-15 + */ +@RestController +@RequestMapping("/system/tagcategory") +public class BaseTagcategoryController extends BaseController { + @Autowired + private IBaseTagcategoryService baseTagcategoryService; + + /** + * 鏌ヨ鏍囩鍒嗙被鍒楄〃 + */ + @PreAuthorize("@ss.hasPermi('system:tagcategory:list')") + @GetMapping("/list") + public TableDataInfo list(BaseTagcategory baseTagcategory) { + startPage(); + List<BaseTagcategory> list = baseTagcategoryService.selectBaseTagcategoryList(baseTagcategory); + return getDataTable(list); + } + + /** + * 瀵煎嚭鏍囩鍒嗙被鍒楄〃 + */ + @PreAuthorize("@ss.hasPermi('system:tagcategory:export')") + @Log(title = "鏍囩鍒嗙被", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BaseTagcategory baseTagcategory) { + List<BaseTagcategory> list = baseTagcategoryService.selectBaseTagcategoryList(baseTagcategory); + ExcelUtil<BaseTagcategory> util = new ExcelUtil<BaseTagcategory>(BaseTagcategory.class); + util.exportExcel(response, list, "鏍囩鍒嗙被鏁版嵁"); + } + + /** + * 鑾峰彇鏍囩鍒嗙被璇︾粏淇℃伅 + */ + @PreAuthorize("@ss.hasPermi('system:tagcategory:query')") + @GetMapping(value = "/{tagcategoryid}") + public AjaxResult getInfo(@PathVariable("tagcategoryid") Long tagcategoryid) { + return success(baseTagcategoryService.selectBaseTagcategoryByTagcategoryid(tagcategoryid)); + } + + /** + * 鏂板鏍囩鍒嗙被 + */ + @PreAuthorize("@ss.hasPermi('system:tagcategory:add')") + @Log(title = "鏍囩鍒嗙被", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BaseTagcategory baseTagcategory) { + return toAjax(baseTagcategoryService.insertBaseTagcategory(baseTagcategory)); + } + + /** + * 淇敼鏍囩鍒嗙被 + */ + @PreAuthorize("@ss.hasPermi('system:tagcategory:edit')") + @Log(title = "鏍囩鍒嗙被", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BaseTagcategory baseTagcategory) { + return toAjax(baseTagcategoryService.updateBaseTagcategory(baseTagcategory)); + } + + /** + * 鍒犻櫎鏍囩鍒嗙被 + */ + @PreAuthorize("@ss.hasPermi('system:tagcategory:remove')") + @Log(title = "鏍囩鍒嗙被", businessType = BusinessType.DELETE) + @DeleteMapping("/{tagcategoryids}") + public AjaxResult remove(@PathVariable Long[] tagcategoryids) { + return toAjax(baseTagcategoryService.deleteBaseTagcategoryByTagcategoryids(tagcategoryids)); + } + + /** + * 鏍规嵁鏍囩绫诲埆鍚嶈幏鍙栨爣绛惧垎绫讳俊鎭� + */ + @ApiOperation("鏍规嵁鏍囩绫诲埆鍚嶈幏鍙栨爣绛惧垎绫讳俊鎭紙鏍囩鍒嗙被锛�") + @PostMapping("/baseTagCategoryByName") + public TableDataInfo baseTagCategoryByName(@RequestParam("name") String name) { + return getDataTable(baseTagcategoryService.baseTagCategoryByName(name)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java index 645746b..aef35aa 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java @@ -9,6 +9,8 @@ import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.smartor.domain.PatArchive; +import com.smartor.domain.PatArchiveReq; +import com.smartor.domain.PatImportInfoVO; import com.smartor.domain.PatUpInfoVO; import com.smartor.service.IPatArchiveService; import io.swagger.annotations.Api; @@ -16,8 +18,12 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; @@ -67,7 +73,7 @@ @ApiOperation("鑾峰彇鎮h�呮。妗堣缁嗕俊鎭�") @PreAuthorize("@ss.hasPermi('smartor:patarchive:query')") @GetMapping(value = "/{patid}") - @ApiImplicitParam(name = "patid",value = "鎮h�卛d") + @ApiImplicitParam(name = "patid", value = "鎮h�卛d") public AjaxResult getInfo(@PathVariable(name = "patid") Long patid) { return success(patArchiveService.selectPatArchiveByPatid(patid)); } @@ -101,7 +107,7 @@ @PreAuthorize("@ss.hasPermi('smartor:patarchive:remove')") @Log(title = "鎮h�呮。妗�", businessType = BusinessType.DELETE) @DeleteMapping("/{patids}") - @ApiImplicitParam(name = "patids",value = "鎮h�卛d闆嗗悎", dataType = "long", dataTypeClass = Long.class) + @ApiImplicitParam(name = "patids", value = "鎮h�卛d闆嗗悎", dataType = "long", dataTypeClass = Long.class) public AjaxResult remove(@PathVariable Long[] patids) { return toAjax(patArchiveService.deletePatArchiveByPatids(patids)); } @@ -114,18 +120,25 @@ */ @ApiOperation("瀵煎叆鎮h�呮枃浠跺鐞�") @PostMapping("/importFilehandle") - - @ApiImplicitParams({ - @ApiImplicitParam(name = "tags", value = "鏍囩"), - @ApiImplicitParam(name = "multipartFile", value = "涓婁紶鏂囦欢") - }) + @ApiImplicitParams({@ApiImplicitParam(name = "tags", value = "鏍囩"), @ApiImplicitParam(name = "multipartFile", value = "涓婁紶鏂囦欢")}) public AjaxResult importFilehandle(@RequestParam("tags") String tags, @RequestParam("multipartFile") MultipartFile multipartFile) { //鑾峰彇褰撳墠鐧婚檰浜� LoginUser loginUser = getLoginUser(); SysUser user = loginUser.getUser(); PatUpInfoVO patUpInfoVO = patArchiveService.importFilehandle(user, tags, multipartFile); - return success(patUpInfoVO); + } + + /** + * 瀵煎叆鎮h�呬俊鎭ā鏉� + * + * @param response + */ + @ApiOperation("鎮h�呬俊鎭鍏ユā鏉�") + @PostMapping("/patImportTemplate") + public void patImportTemplate(HttpServletResponse response) { + ExcelUtil<PatImportInfoVO> util = new ExcelUtil<PatImportInfoVO>(PatImportInfoVO.class); + util.importTemplateExcel(response, "鎮h�呬俊鎭鍏�"); } /** @@ -134,11 +147,50 @@ * @param patArchiveList */ @ApiOperation("瀵煎嚭鎮h�呴敊璇俊鎭�") - @PostMapping("/exportErrPatInfo") - public AjaxResult exportErrPatInfo(@RequestBody List<PatArchive> patArchiveList) { + @PostMapping(value = "/exportErrPatInfo") + public void exportErrPatInfo(HttpServletResponse response, @RequestBody List<PatImportInfoVO> patArchiveList) { - return success(patArchiveService.exportErrPatInfo(patArchiveList)); + ExcelUtil<PatImportInfoVO> util = new ExcelUtil<PatImportInfoVO>(PatImportInfoVO.class); + util.exportExcel(response, patArchiveList, "瀵煎嚭鎮h�呴敊璇俊鎭�"); } + /** + * 鏌ヨ鎮h�呭垪琛� + */ + @ApiOperation("鏌ヨ鎮h�呭垪琛�") + @PostMapping("/patInfoByContion") + public TableDataInfo patInfoByCondition(@RequestBody PatArchiveReq patArchive) { + startPage(); + return getDataTable(patArchiveService.patInfoByContion(patArchive)); + } + + +// /** +// * 鎮h�呮爣绛剧鐞� +// */ +// @ApiOperation("鎮h�呮爣绛剧鐞�") +// @PostMapping("/patTagByContion") +// public TableDataInfo patTagByContion(@RequestBody List<Long> tagids) { +// startPage(); +// return getDataTable(patArchiveService.patTagByContion(tagids)); +// } + + + /** + * 瀵煎嚭鎮h�呭垪琛ㄦ牴鎹潯浠� + */ + @ApiOperation("瀵煎嚭鎮h�呭垪琛ㄦ牴鎹潯浠�") + @PostMapping("/exportPatInfo") + public void exportPpatInfo(HttpServletResponse response, @RequestBody PatArchiveReq patArchive) { + startPage(); + List<PatArchive> patArchives = patArchiveService.patInfoByContion(patArchive); + if (!CollectionUtils.isEmpty(patArchives)) { + for (int i = 0; i < patArchives.size(); i++) { + patArchives.get(i).setTag(patArchives.get(i).getTagList().toString()); + } + } + ExcelUtil<PatArchive> util = new ExcelUtil<PatArchive>(PatArchive.class); + util.exportExcel(response, patArchives, "鎮h�呮。妗堟暟鎹�"); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivetagController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivetagController.java new file mode 100644 index 0000000..6535ca2 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivetagController.java @@ -0,0 +1,99 @@ +package com.ruoyi.web.controller.smartor; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.smartor.domain.PatArchivetag; +import com.smartor.service.IPatArchivetagService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 鎮h�呮。妗堟爣绛綜ontroller + * + * @author ruoyi + * @date 2023-06-13 + */ +@RestController +@RequestMapping("/system/archivetag") +public class PatArchivetagController extends BaseController { + @Autowired + private IPatArchivetagService patArchivetagService; + + /** + * 鏌ヨ鎮h�呮。妗堟爣绛惧垪琛� + */ + @PreAuthorize("@ss.hasPermi('system:archivetag:list')") + @GetMapping("/list") + public TableDataInfo list(PatArchivetag patArchivetag) { + startPage(); + List<PatArchivetag> list = patArchivetagService.selectPatArchivetagList(patArchivetag); + return getDataTable(list); + } + + /** + * 瀵煎嚭鎮h�呮。妗堟爣绛惧垪琛� + */ + @PreAuthorize("@ss.hasPermi('system:archivetag:export')") + @Log(title = "鎮h�呮。妗堟爣绛�", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, PatArchivetag patArchivetag) { + List<PatArchivetag> list = patArchivetagService.selectPatArchivetagList(patArchivetag); + ExcelUtil<PatArchivetag> util = new ExcelUtil<PatArchivetag>(PatArchivetag.class); + util.exportExcel(response, list, "鎮h�呮。妗堟爣绛炬暟鎹�"); + } + + /** + * 鑾峰彇鎮h�呮。妗堟爣绛捐缁嗕俊鎭� + */ + @PreAuthorize("@ss.hasPermi('system:archivetag:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(patArchivetagService.selectPatArchivetagById(id)); + } + + /** + * 鏂板鎮h�呮。妗堟爣绛� + */ + @PreAuthorize("@ss.hasPermi('system:archivetag:add')") + @Log(title = "鎮h�呮。妗堟爣绛�", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody PatArchivetag patArchivetag) { + return toAjax(patArchivetagService.insertPatArchivetag(patArchivetag)); + } + + /** + * 淇敼鎮h�呮。妗堟爣绛� + */ + @PreAuthorize("@ss.hasPermi('system:archivetag:edit')") + @Log(title = "鎮h�呮。妗堟爣绛�", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody PatArchivetag patArchivetag) { + return toAjax(patArchivetagService.updatePatArchivetag(patArchivetag)); + } + + /** + * 鍒犻櫎鎮h�呮。妗堟爣绛� + */ + @PreAuthorize("@ss.hasPermi('system:archivetag:remove')") + @Log(title = "鎮h�呮。妗堟爣绛�", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(patArchivetagService.deletePatArchivetagByIds(ids)); + } + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SchemeAutofinshruleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SchemeAutofinshruleController.java index 7412fa9..52b771c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SchemeAutofinshruleController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SchemeAutofinshruleController.java @@ -1,7 +1,8 @@ -package com.ruoyi.smartor.controller; +package com.ruoyi.web.controller.smartor; import java.util.List; import javax.servlet.http.HttpServletResponse; + import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -23,14 +24,13 @@ /** * 鏂规缁撴瑙勫垯Controller - * + * * @author smartor * @date 2023-03-04 */ @RestController @RequestMapping("/smartor/schemeautofinshrule") -public class SchemeAutofinshruleController extends BaseController -{ +public class SchemeAutofinshruleController extends BaseController { @Autowired private ISchemeAutofinshruleService schemeAutofinshruleService; @@ -39,8 +39,7 @@ */ @PreAuthorize("@ss.hasPermi('smartor:schemeautofinshrule:list')") @GetMapping("/list") - public TableDataInfo list(SchemeAutofinshrule schemeAutofinshrule) - { + public TableDataInfo list(SchemeAutofinshrule schemeAutofinshrule) { startPage(); List<SchemeAutofinshrule> list = schemeAutofinshruleService.selectSchemeAutofinshruleList(schemeAutofinshrule); return getDataTable(list); @@ -52,8 +51,7 @@ @PreAuthorize("@ss.hasPermi('smartor:schemeautofinshrule:export')") @Log(title = "鏂规缁撴瑙勫垯", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, SchemeAutofinshrule schemeAutofinshrule) - { + public void export(HttpServletResponse response, SchemeAutofinshrule schemeAutofinshrule) { List<SchemeAutofinshrule> list = schemeAutofinshruleService.selectSchemeAutofinshruleList(schemeAutofinshrule); ExcelUtil<SchemeAutofinshrule> util = new ExcelUtil<SchemeAutofinshrule>(SchemeAutofinshrule.class); util.exportExcel(response, list, "鏂规缁撴瑙勫垯鏁版嵁"); @@ -64,8 +62,7 @@ */ @PreAuthorize("@ss.hasPermi('smartor:schemeautofinshrule:query')") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(schemeAutofinshruleService.selectSchemeAutofinshruleById(id)); } @@ -75,8 +72,7 @@ @PreAuthorize("@ss.hasPermi('smartor:schemeautofinshrule:add')") @Log(title = "鏂规缁撴瑙勫垯", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody SchemeAutofinshrule schemeAutofinshrule) - { + public AjaxResult add(@RequestBody SchemeAutofinshrule schemeAutofinshrule) { return toAjax(schemeAutofinshruleService.insertSchemeAutofinshrule(schemeAutofinshrule)); } @@ -86,8 +82,7 @@ @PreAuthorize("@ss.hasPermi('smartor:schemeautofinshrule:edit')") @Log(title = "鏂规缁撴瑙勫垯", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody SchemeAutofinshrule schemeAutofinshrule) - { + public AjaxResult edit(@RequestBody SchemeAutofinshrule schemeAutofinshrule) { return toAjax(schemeAutofinshruleService.updateSchemeAutofinshrule(schemeAutofinshrule)); } @@ -96,9 +91,8 @@ */ @PreAuthorize("@ss.hasPermi('smartor:schemeautofinshrule:remove')") @Log(title = "鏂规缁撴瑙勫垯", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(schemeAutofinshruleService.deleteSchemeAutofinshruleByIds(ids)); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTopicController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTopicController.java index f4cf9ec..d309d69 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTopicController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTopicController.java @@ -5,6 +5,9 @@ import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginUser; +import com.smartor.domain.PatImportInfoVO; +import com.smartor.domain.SvyLibTopicRes; +import com.smartor.domain.SvyTopicReq; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -109,15 +112,36 @@ /** - * 鎵归噺瀵煎叆闂棶棰樼洰 + * 鎵归噺瀵煎叆闂鐩� */ @ApiOperation("鎵归噺瀵煎叆闂棶棰樼洰") @PostMapping("/importLitTopic") public AjaxResult importLitTopic(MultipartFile multipartFile) { LoginUser loginUser = getLoginUser(); SysUser user = loginUser.getUser(); - return success(svyLibTopicService.importLitTopic(user, multipartFile)); } + + /** + * 瀵煎叆棰樼洰妯℃澘 + * + * @param response + */ + @ApiOperation("瀵煎叆棰樼洰妯℃澘") + @PostMapping("/importLitTopicTemplate") + public void importLitTopicTemplate(HttpServletResponse response) { + ExcelUtil<SvyLibTopicRes> util = new ExcelUtil<SvyLibTopicRes>(SvyLibTopicRes.class); + util.importTemplateExcel(response, "瀵煎叆棰樼洰"); + } + + /** + * 鑾峰彇棰樼洰 + */ + @ApiOperation("鑾峰彇棰樼洰") + @PostMapping("/showTopic") + public AjaxResult showTopic(@RequestBody SvyTopicReq svyTopicReq) { + return success(svyLibTopicService.showTopic(svyTopicReq)); + } + } diff --git a/smartor/src/main/java/com/smartor/domain/BaseTagcategory.java b/smartor/src/main/java/com/smartor/domain/BaseTagcategory.java new file mode 100644 index 0000000..914c3a2 --- /dev/null +++ b/smartor/src/main/java/com/smartor/domain/BaseTagcategory.java @@ -0,0 +1,83 @@ +package com.smartor.domain; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 鏍囩鍒嗙被瀵硅薄 base_tagcategory + * + * @author ruoyi + * @date 2023-06-15 + */ +@Data +@ApiModel(value = "BaseTagcategory", description = "鏍囩鍒嗙被瀵硅薄") +public class BaseTagcategory extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 鑷ID + */ + @ApiModelProperty(name = "鑷ID") + private Long tagcategoryid; + + /** + * 鏈烘瀯ID + */ + @ApiModelProperty(name = "鏈烘瀯ID") + @Excel(name = " 鏈烘瀯ID ") + private String orgid; + + /** + * 鎷奸煶鐮� + */ + @ApiModelProperty(name = "鎷奸煶鐮�") + @Excel(name = " 鎷奸煶鐮� ") + private String pym; + + /** + * 浜旂瑪鐮� + */ + @ApiModelProperty(name = "浜旂瑪鐮�") + @Excel(name = " 浜旂瑪鐮� ") + private String wbm; + + /** + * 鍒犻櫎鏍囪 + */ + @ApiModelProperty(name = "鍒犻櫎鏍囪") + private String delFlag; + + /** + * 涓婁紶鏍囪 + */ + @ApiModelProperty(name = "涓婁紶鏍囪") + @Excel(name = " 涓婁紶鏍囪 ") + private Long isupload; + + /** + * 涓婁紶鏃堕棿 + */ + @ApiModelProperty(name = "涓婁紶鏃堕棿") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd") + private Date uploadTime; + + /** + * 鏍囩鍚嶇О + */ + @ApiModelProperty(name = "鏍囩绫诲埆鍚嶇О") + @Excel(name = " 鏍囩绫诲埆鍚嶇О ") + private String categoryname; + + @ApiModelProperty(name = "鏍囩鏁伴噺") + private String tagNum; + +} diff --git a/smartor/src/main/java/com/smartor/domain/PatArchive.java b/smartor/src/main/java/com/smartor/domain/PatArchive.java index fdd19ae..1271664 100644 --- a/smartor/src/main/java/com/smartor/domain/PatArchive.java +++ b/smartor/src/main/java/com/smartor/domain/PatArchive.java @@ -1,6 +1,7 @@ package com.smartor.domain; import java.util.Date; +import java.util.List; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiImplicitParam; @@ -69,13 +70,13 @@ * 鏉ユ簮 */ @ApiModelProperty("鏉ユ簮") - @Excel(name = " 鏉ユ簮 ") private Long source; /** * 寤烘。鏃堕棿 */ @ApiModelProperty("寤烘。鏃堕棿") + @Excel(name = " 寤烘。鏃堕棿 ") private Date archivetime; /** @@ -95,19 +96,20 @@ * 浜插睘鍙风爜 */ @ApiModelProperty("浜插睘鍙风爜") + @Excel(name = " 浜插睘鍙风爜 ") private String relativetelcode; /** * 璇佷欢绫诲瀷 */ @ApiModelProperty("璇佷欢绫诲瀷") + @Excel(name = " 璇佷欢绫诲瀷 ") private String iccardtype; /** * 鏈烘瀯ID */ @ApiModelProperty("鏈烘瀯ID") - @Excel(name = " 鏈烘瀯ID ") private String orgid; /** @@ -138,8 +140,13 @@ * 鏍囩 */ @ApiModelProperty("鏍囩") + @Excel(name = " 鏍囩 ", cellType = Excel.ColumnType.STRING) private String tag; + @ApiModelProperty("鏍囩闆嗗悎") + private List<String> tagList; + + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("patid", getPatid()).append("name", getName()).append("sex", getSex()).append("iccardno", getIccardno()).append("birthdate", getBirthdate()).append("age", getAge()).append("source", getSource()).append("archivetime", getArchivetime()).append("archiveby", getArchiveby()).append("telcode", getTelcode()).append("relativetelcode", getRelativetelcode()).append("iccardtype", getIccardtype()).append("orgid", getOrgid()).append("openid", getOpenid()).append("delFlag", getDelFlag()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("isupload", getIsupload()).append("uploadTime", getUploadTime()).toString(); diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveAndTag.java b/smartor/src/main/java/com/smartor/domain/PatArchiveAndTag.java new file mode 100644 index 0000000..6bfe281 --- /dev/null +++ b/smartor/src/main/java/com/smartor/domain/PatArchiveAndTag.java @@ -0,0 +1,150 @@ +package com.smartor.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; +import java.util.List; + +/** + * 鎮h�呮。妗堝璞� pat_archive + * + * @author smartor + * @date 2023-03-04 + */ +@ApiModel(value = "PatArchive", description = "鎮h�呮。妗堝璞�") +@Data +public class PatArchiveAndTag extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 鑷ID + */ + @ApiModelProperty(name = "鑷ID") + private Long patid; + + /** + * 濮撳悕 + */ + @ApiModelProperty("濮撳悕") + @Excel(name = " 濮撳悕 ") + private String name; + + /** + * 鎬у埆 1:鐢� 2:濂� + */ + @ApiModelProperty("鎬у埆") + @Excel(name = " 鎬у埆 ") + private Long sex; + + /** + * 璇佷欢鍙风爜 + */ + @ApiModelProperty("璇佷欢鍙风爜") + @Excel(name = " 璇佷欢鍙风爜 ") + private String iccardno; + + /** + * 鐢熸棩 + */ + @ApiModelProperty("鐢熸棩") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = " 鐢熸棩 ", width = 30, dateFormat = "yyyy-MM-dd") + private Date birthdate; + + /** + * 骞撮緞 + */ + @ApiModelProperty("骞撮緞") + @Excel(name = " 骞撮緞 ") + private Long age; + + /** + * 鏉ユ簮 + */ + @ApiModelProperty("鏉ユ簮") + @Excel(name = " 鏉ユ簮 ") + private Long source; + + /** + * 寤烘。鏃堕棿 + */ + @ApiModelProperty("寤烘。鏃堕棿") + private Date archivetime; + + /** + * 寤烘。浜� + */ + @ApiModelProperty("寤烘。浜�") + private String archiveby; + + /** + * 鎵嬫満鍙风爜 + */ + @ApiModelProperty("鎵嬫満鍙风爜") + @Excel(name = " 鎵嬫満鍙风爜 ") + private String telcode; + + /** + * 浜插睘鍙风爜 + */ + @ApiModelProperty("浜插睘鍙风爜") + private String relativetelcode; + + /** + * 璇佷欢绫诲瀷 + */ + @ApiModelProperty("璇佷欢绫诲瀷") + private String iccardtype; + + /** + * 鏈烘瀯ID + */ + @ApiModelProperty("鏈烘瀯ID") + @Excel(name = " 鏈烘瀯ID ") + private String orgid; + + /** + * 寰俊openid + */ + @ApiModelProperty("寰俊openid") + private String openid; + + /** + * 鍒犻櫎鏍囪 + */ + @ApiModelProperty("鍒犻櫎鏍囪") + private String delFlag; + + /** + * 涓婁紶鏍囪 + */ + @ApiModelProperty("涓婁紶鏍囪") + private Long isupload; + + /** + * 涓婁紶鏃堕棿 + */ + @ApiModelProperty("涓婁紶鏃堕棿") + private Date uploadTime; + + /** + * 鏍囩 + */ + @ApiModelProperty("鏍囩") + private String tag; + + @ApiModelProperty("鏍囩闆嗗悎") + List<PatArchivetag> patArchivetags; + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("patid", getPatid()).append("name", getName()).append("sex", getSex()).append("iccardno", getIccardno()).append("birthdate", getBirthdate()).append("age", getAge()).append("source", getSource()).append("archivetime", getArchivetime()).append("archiveby", getArchiveby()).append("telcode", getTelcode()).append("relativetelcode", getRelativetelcode()).append("iccardtype", getIccardtype()).append("orgid", getOrgid()).append("openid", getOpenid()).append("delFlag", getDelFlag()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("isupload", getIsupload()).append("uploadTime", getUploadTime()).toString(); + } +} diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java b/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java new file mode 100644 index 0000000..b0c86f9 --- /dev/null +++ b/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java @@ -0,0 +1,54 @@ +package com.smartor.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; +import java.util.List; + +/** + * 鎮h�呮。妗堣姹傚璞� + * + * @author ls + * @date 2023-06-14 + */ +@ApiModel(value = "PatArchiveReq", description = "鎮h�呮。妗堣姹傚璞�") +@Data +public class PatArchiveReq { + + /** + * 濮撳悕 + */ + @ApiModelProperty("濮撳悕") + @Excel(name = " 濮撳悕 ") + private String name; + + /** + * 璇佷欢鍙风爜 + */ + @ApiModelProperty("璇佷欢鍙风爜") + @Excel(name = " 璇佷欢鍙风爜 ") + private String iccardno; + + + /** + * 鎵嬫満鍙风爜 + */ + @ApiModelProperty("鎵嬫満鍙风爜") + @Excel(name = " 鎵嬫満鍙风爜 ") + private String telcode; + + /** + * 鏍囩ID + */ + @ApiModelProperty("鏍囩ID") + private String tagId; + + +} diff --git a/smartor/src/main/java/com/smartor/domain/PatArchivetag.java b/smartor/src/main/java/com/smartor/domain/PatArchivetag.java index 2bc2abc..cab2c69 100644 --- a/smartor/src/main/java/com/smartor/domain/PatArchivetag.java +++ b/smartor/src/main/java/com/smartor/domain/PatArchivetag.java @@ -1,9 +1,11 @@ package com.smartor.domain; import java.util.Date; + import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -11,137 +13,70 @@ /** * 鎮h�呮。妗堟爣绛惧璞� pat_archivetag - * + * * @author ruoyi * @date 2023-06-02 */ +@Data @ApiModel(value = "PatArchivetag", description = "鎮h�呮。妗堟爣绛惧璞�") -public class PatArchivetag extends BaseEntity -{ +public class PatArchivetag extends BaseEntity { private static final long serialVersionUID = 1L; - /** 鑷ID */ + /** + * 鑷ID + */ @ApiModelProperty(name = "鑷ID") private Long id; - /** 鏍囩鍒嗙被ID */ + /** + * 鏍囩鍒嗙被ID + */ @ApiModelProperty(name = "鏍囩鍒嗙被ID") private Long tagcategoryid; - /** 鏍囩ID */ + /** + * 鏍囩ID + */ @ApiModelProperty(name = "鏍囩ID") private Long tagid; - /** 鏈烘瀯ID */ + /** + * 鏈烘瀯ID + */ @ApiModelProperty(name = "鏈烘瀯ID") private String orgid; - /** 鍒犻櫎鏍囪 */ + /** + * 鍒犻櫎鏍囪 + */ @ApiModelProperty(name = "鍒犻櫎鏍囪") private String delFlag; - /** 涓婁紶鏍囪 */ + /** + * 涓婁紶鏍囪 + */ @ApiModelProperty(name = "涓婁紶鏍囪") private Long isupload; - /** 涓婁紶鏃堕棿 */ + /** + * 涓婁紶鏃堕棿 + */ @ApiModelProperty(name = "涓婁紶鏃堕棿") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd") private Date uploadTime; - /** 妗fID */ + @ApiModelProperty(name = "鏍囩鍚嶇О") + private String tagname; + + /** + * 妗fID + */ @ApiModelProperty(name = "妗fID") private Long patid; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setTagcategoryid(Long tagcategoryid) - { - this.tagcategoryid = tagcategoryid; - } - - public Long getTagcategoryid() - { - return tagcategoryid; - } - public void setTagid(Long tagid) - { - this.tagid = tagid; - } - - public Long getTagid() - { - return tagid; - } - public void setOrgid(String orgid) - { - this.orgid = orgid; - } - - public String getOrgid() - { - return orgid; - } - public void setDelFlag(String delFlag) - { - this.delFlag = delFlag; - } - - public String getDelFlag() - { - return delFlag; - } - public void setIsupload(Long isupload) - { - this.isupload = isupload; - } - - public Long getIsupload() - { - return isupload; - } - public void setUploadTime(Date uploadTime) - { - this.uploadTime = uploadTime; - } - - public Date getUploadTime() - { - return uploadTime; - } - public void setPatid(Long patid) - { - this.patid = patid; - } - - public Long getPatid() - { - return patid; - } - @Override public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("tagcategoryid", getTagcategoryid()) - .append("tagid", getTagid()) - .append("orgid", getOrgid()) - .append("delFlag", getDelFlag()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("isupload", getIsupload()) - .append("uploadTime", getUploadTime()) - .append("patid", getPatid()) - .toString(); + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("tagname", getTagname()).append("id", getId()).append("tagcategoryid", getTagcategoryid()).append("tagid", getTagid()).append("orgid", getOrgid()).append("delFlag", getDelFlag()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("isupload", getIsupload()).append("uploadTime", getUploadTime()).append("patid", getPatid()).toString(); } } diff --git a/smartor/src/main/java/com/smartor/domain/PatArchivetagAndPatientInfo.java b/smartor/src/main/java/com/smartor/domain/PatArchivetagAndPatientInfo.java new file mode 100644 index 0000000..875da04 --- /dev/null +++ b/smartor/src/main/java/com/smartor/domain/PatArchivetagAndPatientInfo.java @@ -0,0 +1,85 @@ +package com.smartor.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; +import java.util.List; + +/** + * 鎮h�呮。妗堟爣绛惧璞� pat_archivetag + * + * @author ruoyi + * @date 2023-06-02 + */ +@Data +@ApiModel(value = "PatArchivetag", description = "鎮h�呮。妗堟爣绛惧璞�") +public class PatArchivetagAndPatientInfo { + private static final long serialVersionUID = 1L; + +// /** +// * 鑷ID +// */ +// @ApiModelProperty(name = "鑷ID") +// private Long id; +// +// /** +// * 鏍囩鍒嗙被ID +// */ +// @ApiModelProperty(name = "鏍囩鍒嗙被ID") +// private Long tagcategoryid; +// +// /** +// * 鏍囩ID +// */ +// @ApiModelProperty(name = "鏍囩ID") +// private Long tagid; +// +// /** +// * 鏈烘瀯ID +// */ +// @ApiModelProperty(name = "鏈烘瀯ID") +// private String orgid; +// +// /** +// * 鍒犻櫎鏍囪 +// */ +// @ApiModelProperty(name = "鍒犻櫎鏍囪") +// private String delFlag; +// +// /** +// * 涓婁紶鏍囪 +// */ +// @ApiModelProperty(name = "涓婁紶鏍囪") +// private Long isupload; +// +// /** +// * 涓婁紶鏃堕棿 +// */ +// @ApiModelProperty(name = "涓婁紶鏃堕棿") +// @JsonFormat(pattern = "yyyy-MM-dd") +// @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd") +// private Date uploadTime; + + @ApiModelProperty(name = "鏍囩鍚嶇О") + private String tagname; + + /** + * 妗fID + */ + @ApiModelProperty(name = "妗fID") + private Long patid; + + @ApiModelProperty("鎮h�呮暟閲�") + private Integer patNum; + + @ApiModelProperty("鎮h�呴泦鍚�") + private List<PatArchive> patArchives; + +} diff --git a/smartor/src/main/java/com/smartor/domain/PatImportInfoVO.java b/smartor/src/main/java/com/smartor/domain/PatImportInfoVO.java new file mode 100644 index 0000000..7a199d4 --- /dev/null +++ b/smartor/src/main/java/com/smartor/domain/PatImportInfoVO.java @@ -0,0 +1,77 @@ +package com.smartor.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * 鎮h�呭鍏ヤ俊鎭� + * + * @author 鍒樼渷 + * @date 2023-06-06 + */ +@ApiModel(value = "PatImportInfoVO", description = "鎮h�呮。妗堝璞�") +@Data +public class PatImportInfoVO extends BaseEntity { + + /** + * 濮撳悕 + */ + @Excel(name = " 濮撳悕 ") + private String name; + + /** + * 鎬у埆 + */ + @Excel(name = " 鎬у埆 ") + private String sex; + + /** + * 璇佷欢绫诲瀷 + */ + @Excel(name = " 璇佷欢绫诲瀷 ") + private String idcartType; + + /** + * 璇佷欢鍙风爜 + */ + @Excel(name = " 璇佷欢鍙风爜 ") + private String idCardNum; + + /** + * 鍑虹敓鏃ユ湡 + */ + @Excel(name = " 鍑虹敓鏃ユ湡 ") + private String birthday; + + + /** + * 鏈汉鑱旂郴鏂瑰紡 + */ + @Excel(name = " 鏈汉鑱旂郴鏂瑰紡 ") + private String telcode; + + /** + * 浜插睘鑱旂郴鏂瑰紡 + */ + @Excel(name = " 浜插睘鑱旂郴鏂瑰紡 ") + private String relativetelcode; + + /** + * 鎮h�呮爣绛� + */ + @Excel(name = " 鎮h�呮爣绛� ") + private String tad; + + /** + * 閿欒鍘熷洜 + */ + @Excel(name = " 閿欒鍘熷洜 ") + private String reason; + + +} diff --git a/smartor/src/main/java/com/smartor/domain/SvyLibTopicAndOptionRes.java b/smartor/src/main/java/com/smartor/domain/SvyLibTopicAndOptionRes.java new file mode 100644 index 0000000..daf1684 --- /dev/null +++ b/smartor/src/main/java/com/smartor/domain/SvyLibTopicAndOptionRes.java @@ -0,0 +1,64 @@ +package com.smartor.domain; + +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 闂嵎棰樼洰灞曠ず杩斿弬 + * + * @author ruoyi + * @date 2023-03-03 + */ +@Data +@ApiModel(value = "SvyLibTopicAndOptionRes", description = "闂嵎棰樼洰灞曠ず杩斿弬") +public class SvyLibTopicAndOptionRes extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 鑷ID + */ + @ApiModelProperty(name = "鑷ID") + private Long topicid; + + + /** + * 棰樼洰 + */ + @ApiModelProperty(name = "棰樼洰") + private String topic; + + /** + * 棰樼洰code + */ + @ApiModelProperty(name = "棰樼洰code") + private String topiccode; + + + /** + * 棰樼洰绫诲瀷;鏋氫妇 1.鍗曢�� 2澶氶�� 3濉┖ + */ + @ApiModelProperty(name = "棰樼洰绫诲瀷;鏋氫妇 1.鍗曢�� 2澶氶�� 3濉┖") + private String topictype; + + /** + * 绫诲埆 + */ + @ApiModelProperty(name = "绫诲埆") + private String tag; + + /** + * 閫夐」code + */ + @ApiModelProperty(name = "閫夐」code") + private String optioncode; + + /** + * 閫夐」鍐呭 + */ + @ApiModelProperty(name = "閫夐」鍐呭") + private String optioncontent; + + +} diff --git a/smartor/src/main/java/com/smartor/domain/SvyLibTopicRes.java b/smartor/src/main/java/com/smartor/domain/SvyLibTopicRes.java index aff31d5..d946b79 100644 --- a/smartor/src/main/java/com/smartor/domain/SvyLibTopicRes.java +++ b/smartor/src/main/java/com/smartor/domain/SvyLibTopicRes.java @@ -1,5 +1,6 @@ package com.smartor.domain; +import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -34,12 +35,14 @@ * 棰樼洰 */ @ApiModelProperty(name = "棰樼洰") + @Excel(name = " 棰樼洰 ") private String topic; /** * 绫诲埆 */ @ApiModelProperty(name = "绫诲埆") + @Excel(name = " 绫诲埆 ") private String tag; @@ -47,48 +50,84 @@ * 棰樼洰绫诲瀷;鏋氫妇 1.鍗曢�� 2澶氶�� 3濉┖ */ @ApiModelProperty(name = "棰樼洰绫诲瀷;鏋氫妇 1.鍗曢�� 2澶氶�� 3濉┖") + @Excel(name = " 棰樼洰绫诲瀷;鏋氫妇 1.鍗曢�� 2澶氶�� 3濉┖ ") private String topictype; /** * 绛旀 */ @ApiModelProperty(name = "绛旀") + @Excel(name = " 绛旀 ") private String answer; /** * 閫夐」A */ @ApiModelProperty(name = "閫夐」A") + @Excel(name = " 閫夐」A ") private String optionA; /** * 閫夐」B */ @ApiModelProperty(name = "閫夐」B") + @Excel(name = " 閫夐」B ") private String optionB; /** * 閫夐」C */ @ApiModelProperty(name = "閫夐」C") + @Excel(name = " 閫夐」C ") private String optionC; /** * 閫夐」D */ @ApiModelProperty(name = "閫夐」D") + @Excel(name = " 閫夐」D ") private String optionD; + + /** + * 閫夐」D + */ + @ApiModelProperty(name = "閫夐」E") + @Excel(name = " 閫夐」E ") + private String optionE; + + /** + * 閫夐」D + */ + @ApiModelProperty(name = "閫夐」F") + @Excel(name = " 閫夐」F ") + private String optionF; + + /** + * 閫夐」D + */ + @ApiModelProperty(name = "閫夐」G") + @Excel(name = " 閫夐」G ") + private String optionG; + + /** + * 閫夐」D + */ + @ApiModelProperty(name = "閫夐」H") + @Excel(name = " 閫夐」H ") + private String optionH; /** * 鍒嗘暟 */ @ApiModelProperty(name = "鍒嗘暟") + @Excel(name = " 鍒嗘暟 ") private String score; /** * 澶囨敞 */ @ApiModelProperty(name = "澶囨敞") + @Excel(name = " 澶囨敞 ") private String remark; diff --git a/smartor/src/main/java/com/smartor/domain/SvyTopicReq.java b/smartor/src/main/java/com/smartor/domain/SvyTopicReq.java new file mode 100644 index 0000000..e065bc0 --- /dev/null +++ b/smartor/src/main/java/com/smartor/domain/SvyTopicReq.java @@ -0,0 +1,34 @@ +package com.smartor.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; + +/** + * 闂嵎棰樼洰鏌ヨ + * + * @author ls + * @date 2023-06-13 + */ +@Data +@ApiModel(value = "SvyTopicReq", description = "闂嵎棰樼洰鏌ヨ") +public class SvyTopicReq { + + /** + * 棰樼洰 + */ + @ApiModelProperty(name = "棰樼洰") + private String topic; + + @ApiModelProperty(name = "棰樼洰绫诲瀷;鏋氫妇 1.鍗曢�� 2澶氶�� 3濉┖") + private String topicType; + + @ApiModelProperty(name = "绫诲埆") + private String tag; +} diff --git a/smartor/src/main/java/com/smartor/mapper/BaseTagMapper.java b/smartor/src/main/java/com/smartor/mapper/BaseTagMapper.java index baf8532..6039de5 100644 --- a/smartor/src/main/java/com/smartor/mapper/BaseTagMapper.java +++ b/smartor/src/main/java/com/smartor/mapper/BaseTagMapper.java @@ -1,9 +1,9 @@ package com.smartor.mapper; -import java.util.List; - import com.smartor.domain.BaseTag; import org.apache.ibatis.annotations.Mapper; + +import java.util.List; /** * 鏍囩Mapper鎺ュ彛 @@ -60,4 +60,6 @@ * @return 缁撴灉 */ public int deleteBaseTagByTagids(Long[] tagids); + + } diff --git a/smartor/src/main/java/com/smartor/mapper/BaseTagcategoryMapper.java b/smartor/src/main/java/com/smartor/mapper/BaseTagcategoryMapper.java new file mode 100644 index 0000000..8a838ff --- /dev/null +++ b/smartor/src/main/java/com/smartor/mapper/BaseTagcategoryMapper.java @@ -0,0 +1,66 @@ +package com.smartor.mapper; + +import com.smartor.domain.BaseTagcategory; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 鏍囩鍒嗙被Mapper鎺ュ彛 + * + * @author ruoyi + * @date 2023-06-15 + */ +@Mapper +public interface BaseTagcategoryMapper { + /** + * 鏌ヨ鏍囩鍒嗙被 + * + * @param tagcategoryid 鏍囩鍒嗙被涓婚敭 + * @return 鏍囩鍒嗙被 + */ + public BaseTagcategory selectBaseTagcategoryByTagcategoryid(Long tagcategoryid); + + /** + * 鏌ヨ鏍囩鍒嗙被鍒楄〃 + * + * @param baseTagcategory 鏍囩鍒嗙被 + * @return 鏍囩鍒嗙被闆嗗悎 + */ + public List<BaseTagcategory> selectBaseTagcategoryList(BaseTagcategory baseTagcategory); + + /** + * 鏂板鏍囩鍒嗙被 + * + * @param baseTagcategory 鏍囩鍒嗙被 + * @return 缁撴灉 + */ + public int insertBaseTagcategory(BaseTagcategory baseTagcategory); + + /** + * 淇敼鏍囩鍒嗙被 + * + * @param baseTagcategory 鏍囩鍒嗙被 + * @return 缁撴灉 + */ + public int updateBaseTagcategory(BaseTagcategory baseTagcategory); + + /** + * 鍒犻櫎鏍囩鍒嗙被 + * + * @param tagcategoryid 鏍囩鍒嗙被涓婚敭 + * @return 缁撴灉 + */ + public int deleteBaseTagcategoryByTagcategoryid(Long tagcategoryid); + + /** + * 鎵归噺鍒犻櫎鏍囩鍒嗙被 + * + * @param tagcategoryids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎 + * @return 缁撴灉 + */ + public int deleteBaseTagcategoryByTagcategoryids(Long[] tagcategoryids); + + + public List<BaseTagcategory> baseTagCategoryByName(String categoryname); +} diff --git a/smartor/src/main/java/com/smartor/mapper/PatArchiveMapper.java b/smartor/src/main/java/com/smartor/mapper/PatArchiveMapper.java index c10017e..1308eda 100644 --- a/smartor/src/main/java/com/smartor/mapper/PatArchiveMapper.java +++ b/smartor/src/main/java/com/smartor/mapper/PatArchiveMapper.java @@ -3,6 +3,7 @@ import java.util.List; import com.smartor.domain.PatArchive; +import com.smartor.domain.PatArchiveReq; import org.apache.ibatis.annotations.Mapper; /** @@ -29,6 +30,9 @@ */ public List<PatArchive> selectPatArchiveList(PatArchive patArchive); + public List<PatArchive> patInfoByContion(PatArchiveReq patArchive); + + /** * 鏂板鎮h�呮。妗� * diff --git a/smartor/src/main/java/com/smartor/mapper/PatArchivetagMapper.java b/smartor/src/main/java/com/smartor/mapper/PatArchivetagMapper.java index 8e08f03..4e0bc83 100644 --- a/smartor/src/main/java/com/smartor/mapper/PatArchivetagMapper.java +++ b/smartor/src/main/java/com/smartor/mapper/PatArchivetagMapper.java @@ -29,6 +29,16 @@ */ public List<PatArchivetag> selectPatArchivetagList(PatArchivetag patArchivetag); + + /** + * 鏌ヨ鎮h�呮。妗堟爣绛惧垪琛� + * + * @param patArchivetag 鎮h�呮。妗堟爣绛句俊鎭� + * @return 鎮h�呮。妗堟爣绛鹃泦鍚� + */ + public List<PatArchivetag> selectPatArchivetagAndBaseTagList(PatArchivetag patArchivetag); + + /** * 鏂板鎮h�呮。妗堟爣绛� * diff --git a/smartor/src/main/java/com/smartor/mapper/SvyLibTopicMapper.java b/smartor/src/main/java/com/smartor/mapper/SvyLibTopicMapper.java index 0131e43..37f2abc 100644 --- a/smartor/src/main/java/com/smartor/mapper/SvyLibTopicMapper.java +++ b/smartor/src/main/java/com/smartor/mapper/SvyLibTopicMapper.java @@ -3,6 +3,8 @@ import java.util.List; import com.smartor.domain.SvyLibTopic; +import com.smartor.domain.SvyLibTopicAndOptionRes; +import com.smartor.domain.SvyTopicReq; import org.apache.ibatis.annotations.Mapper; /** @@ -60,4 +62,7 @@ * @return 缁撴灉 */ public int deleteSvyLibTopicByTopicids(Long[] topicids); + + + public List<SvyLibTopicAndOptionRes> showTopic(SvyTopicReq svyTopicReq); } diff --git a/smartor/src/main/java/com/smartor/mapper/SvyLibTopicoptionMapper.java b/smartor/src/main/java/com/smartor/mapper/SvyLibTopicoptionMapper.java index f7cd308..9d655ab 100644 --- a/smartor/src/main/java/com/smartor/mapper/SvyLibTopicoptionMapper.java +++ b/smartor/src/main/java/com/smartor/mapper/SvyLibTopicoptionMapper.java @@ -2,7 +2,10 @@ import java.util.List; +import com.smartor.domain.SvyLibTopicAndOptionRes; +import com.smartor.domain.SvyLibTopicRes; import com.smartor.domain.SvyLibTopicoption; +import com.smartor.domain.SvyTopicReq; import org.apache.ibatis.annotations.Mapper; /** @@ -60,4 +63,5 @@ * @return 缁撴灉 */ public int deleteSvyLibTopicoptionByOptionids(Long[] optionids); + } diff --git a/smartor/src/main/java/com/smartor/service/IBaseTagService.java b/smartor/src/main/java/com/smartor/service/IBaseTagService.java index 1f2c984..a9d2e39 100644 --- a/smartor/src/main/java/com/smartor/service/IBaseTagService.java +++ b/smartor/src/main/java/com/smartor/service/IBaseTagService.java @@ -1,19 +1,19 @@ package com.smartor.service; import java.util.List; + import com.smartor.domain.BaseTag; /** * 鏍囩Service鎺ュ彛 - * + * * @author ruoyi * @date 2023-06-02 */ -public interface IBaseTagService -{ +public interface IBaseTagService { /** * 鏌ヨ鏍囩 - * + * * @param tagid 鏍囩涓婚敭 * @return 鏍囩 */ @@ -21,7 +21,7 @@ /** * 鏌ヨ鏍囩鍒楄〃 - * + * * @param baseTag 鏍囩 * @return 鏍囩闆嗗悎 */ @@ -29,7 +29,7 @@ /** * 鏂板鏍囩 - * + * * @param baseTag 鏍囩 * @return 缁撴灉 */ @@ -37,7 +37,7 @@ /** * 淇敼鏍囩 - * + * * @param baseTag 鏍囩 * @return 缁撴灉 */ @@ -45,7 +45,7 @@ /** * 鎵归噺鍒犻櫎鏍囩 - * + * * @param tagids 闇�瑕佸垹闄ょ殑鏍囩涓婚敭闆嗗悎 * @return 缁撴灉 */ @@ -53,9 +53,11 @@ /** * 鍒犻櫎鏍囩淇℃伅 - * + * * @param tagid 鏍囩涓婚敭 * @return 缁撴灉 */ public int deleteBaseTagByTagid(Long tagid); + + } diff --git a/smartor/src/main/java/com/smartor/service/IBaseTagcategoryService.java b/smartor/src/main/java/com/smartor/service/IBaseTagcategoryService.java new file mode 100644 index 0000000..c84bdbb --- /dev/null +++ b/smartor/src/main/java/com/smartor/service/IBaseTagcategoryService.java @@ -0,0 +1,66 @@ +package com.smartor.service; + +import com.ruoyi.common.core.page.TableDataInfo; +import com.smartor.domain.BaseTagcategory; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; + +/** + * 鏍囩鍒嗙被Service鎺ュ彛 + * + * @author ruoyi + * @date 2023-06-15 + */ +public interface IBaseTagcategoryService { + /** + * 鏌ヨ鏍囩鍒嗙被 + * + * @param tagcategoryid 鏍囩鍒嗙被涓婚敭 + * @return 鏍囩鍒嗙被 + */ + public BaseTagcategory selectBaseTagcategoryByTagcategoryid(Long tagcategoryid); + + /** + * 鏌ヨ鏍囩鍒嗙被鍒楄〃 + * + * @param baseTagcategory 鏍囩鍒嗙被 + * @return 鏍囩鍒嗙被闆嗗悎 + */ + public List<BaseTagcategory> selectBaseTagcategoryList(BaseTagcategory baseTagcategory); + + /** + * 鏂板鏍囩鍒嗙被 + * + * @param baseTagcategory 鏍囩鍒嗙被 + * @return 缁撴灉 + */ + public int insertBaseTagcategory(BaseTagcategory baseTagcategory); + + /** + * 淇敼鏍囩鍒嗙被 + * + * @param baseTagcategory 鏍囩鍒嗙被 + * @return 缁撴灉 + */ + public int updateBaseTagcategory(BaseTagcategory baseTagcategory); + + /** + * 鎵归噺鍒犻櫎鏍囩鍒嗙被 + * + * @param tagcategoryids 闇�瑕佸垹闄ょ殑鏍囩鍒嗙被涓婚敭闆嗗悎 + * @return 缁撴灉 + */ + public int deleteBaseTagcategoryByTagcategoryids(Long[] tagcategoryids); + + /** + * 鍒犻櫎鏍囩鍒嗙被淇℃伅 + * + * @param tagcategoryid 鏍囩鍒嗙被涓婚敭 + * @return 缁撴灉 + */ + public int deleteBaseTagcategoryByTagcategoryid(Long tagcategoryid); + + + public List<BaseTagcategory> baseTagCategoryByName(String name); +} diff --git a/smartor/src/main/java/com/smartor/service/IPatArchiveService.java b/smartor/src/main/java/com/smartor/service/IPatArchiveService.java index b0d1035..d72589c 100644 --- a/smartor/src/main/java/com/smartor/service/IPatArchiveService.java +++ b/smartor/src/main/java/com/smartor/service/IPatArchiveService.java @@ -4,8 +4,7 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.entity.SysUser; -import com.smartor.domain.PatArchive; -import com.smartor.domain.PatUpInfoVO; +import com.smartor.domain.*; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; @@ -71,7 +70,7 @@ * @param tags * @param file */ - public PatUpInfoVO importFilehandle(SysUser user,String tags, MultipartFile file); + public PatUpInfoVO importFilehandle(SysUser user, String tags, MultipartFile file); /** * 瀵煎嚭鎮h�呴敊璇俊鎭� @@ -80,4 +79,12 @@ * @return */ public String exportErrPatInfo(List<PatArchive> patArchiveList); + + + public List<PatArchive> patInfoByContion(PatArchiveReq patArchive); + + + public List<PatArchivetagAndPatientInfo> patTagByContion(List<Long> tagids); + + public List<PatArchivetagAndPatientInfo> patInfoByTag(List<Long> tagids); } diff --git a/smartor/src/main/java/com/smartor/service/IPatArchivetagService.java b/smartor/src/main/java/com/smartor/service/IPatArchivetagService.java index 59e93b0..158ab41 100644 --- a/smartor/src/main/java/com/smartor/service/IPatArchivetagService.java +++ b/smartor/src/main/java/com/smartor/service/IPatArchivetagService.java @@ -2,7 +2,9 @@ import java.util.List; +import com.ruoyi.common.core.page.TableDataInfo; import com.smartor.domain.PatArchivetag; +import com.smartor.domain.PatArchivetagAndPatientInfo; /** * 鎮h�呮。妗堟爣绛維ervice鎺ュ彛 @@ -58,4 +60,5 @@ * @return 缁撴灉 */ public int deletePatArchivetagById(Long id); -} + +} \ No newline at end of file diff --git a/smartor/src/main/java/com/smartor/service/ISvyLibTopicService.java b/smartor/src/main/java/com/smartor/service/ISvyLibTopicService.java index 769f387..4a93408 100644 --- a/smartor/src/main/java/com/smartor/service/ISvyLibTopicService.java +++ b/smartor/src/main/java/com/smartor/service/ISvyLibTopicService.java @@ -6,6 +6,8 @@ import com.ruoyi.common.core.domain.entity.SysUser; import com.smartor.domain.SvyLibTopic; import com.smartor.domain.SvyLibTopicRes; +import com.smartor.domain.SvyTopicReq; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.multipart.MultipartFile; /** @@ -69,5 +71,7 @@ * @param multipartFile * @return */ - public List<SvyLibTopicRes> importLitTopic(SysUser user,MultipartFile multipartFile); + public List<SvyLibTopicRes> importLitTopic(SysUser user, MultipartFile multipartFile); + + public SvyLibTopicRes showTopic(SvyTopicReq svyTopicReq); } diff --git a/smartor/src/main/java/com/smartor/service/impl/BaseTagServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/BaseTagServiceImpl.java index e80520a..6866323 100644 --- a/smartor/src/main/java/com/smartor/service/impl/BaseTagServiceImpl.java +++ b/smartor/src/main/java/com/smartor/service/impl/BaseTagServiceImpl.java @@ -87,4 +87,6 @@ public int deleteBaseTagByTagid(Long tagid) { return baseTagMapper.deleteBaseTagByTagid(tagid); } + + } diff --git a/smartor/src/main/java/com/smartor/service/impl/BaseTagcategoryServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/BaseTagcategoryServiceImpl.java new file mode 100644 index 0000000..2420656 --- /dev/null +++ b/smartor/src/main/java/com/smartor/service/impl/BaseTagcategoryServiceImpl.java @@ -0,0 +1,101 @@ +package com.smartor.service.impl; + +import com.ruoyi.common.utils.DateUtils; +import com.smartor.domain.BaseTagcategory; +import com.smartor.mapper.BaseTagcategoryMapper; +import com.smartor.service.IBaseTagcategoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 鏍囩鍒嗙被Service涓氬姟灞傚鐞� + * + * @author ruoyi + * @date 2023-06-15 + */ +@Service +public class BaseTagcategoryServiceImpl implements IBaseTagcategoryService { + @Autowired + private BaseTagcategoryMapper baseTagcategoryMapper; + + /** + * 鏌ヨ鏍囩鍒嗙被 + * + * @param tagcategoryid 鏍囩鍒嗙被涓婚敭 + * @return 鏍囩鍒嗙被 + */ + @Override + public BaseTagcategory selectBaseTagcategoryByTagcategoryid(Long tagcategoryid) { + return baseTagcategoryMapper.selectBaseTagcategoryByTagcategoryid(tagcategoryid); + } + + /** + * 鏌ヨ鏍囩鍒嗙被鍒楄〃 + * + * @param baseTagcategory 鏍囩鍒嗙被 + * @return 鏍囩鍒嗙被 + */ + @Override + public List<BaseTagcategory> selectBaseTagcategoryList(BaseTagcategory baseTagcategory) { + return baseTagcategoryMapper.selectBaseTagcategoryList(baseTagcategory); + } + + /** + * 鏂板鏍囩鍒嗙被 + * + * @param baseTagcategory 鏍囩鍒嗙被 + * @return 缁撴灉 + */ + @Override + public int insertBaseTagcategory(BaseTagcategory baseTagcategory) { + baseTagcategory.setCreateTime(DateUtils.getNowDate()); + return baseTagcategoryMapper.insertBaseTagcategory(baseTagcategory); + } + + /** + * 淇敼鏍囩鍒嗙被 + * + * @param baseTagcategory 鏍囩鍒嗙被 + * @return 缁撴灉 + */ + @Override + public int updateBaseTagcategory(BaseTagcategory baseTagcategory) { + baseTagcategory.setUpdateTime(DateUtils.getNowDate()); + return baseTagcategoryMapper.updateBaseTagcategory(baseTagcategory); + } + + /** + * 鎵归噺鍒犻櫎鏍囩鍒嗙被 + * + * @param tagcategoryids 闇�瑕佸垹闄ょ殑鏍囩鍒嗙被涓婚敭 + * @return 缁撴灉 + */ + @Override + public int deleteBaseTagcategoryByTagcategoryids(Long[] tagcategoryids) { + return baseTagcategoryMapper.deleteBaseTagcategoryByTagcategoryids(tagcategoryids); + } + + /** + * 鍒犻櫎鏍囩鍒嗙被淇℃伅 + * + * @param tagcategoryid 鏍囩鍒嗙被涓婚敭 + * @return 缁撴灉 + */ + @Override + public int deleteBaseTagcategoryByTagcategoryid(Long tagcategoryid) { + return baseTagcategoryMapper.deleteBaseTagcategoryByTagcategoryid(tagcategoryid); + } + + /** + * 鏍规嵁鏍囩绫诲埆鍚嶈幏鍙栨爣绛剧被鍒俊鎭� + * + * @param name + * @return + */ + @Override + public List<BaseTagcategory> baseTagCategoryByName(String name) { + return baseTagcategoryMapper.baseTagCategoryByName(name); + } +} diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java index 9cad7d3..55eb072 100644 --- a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java +++ b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java @@ -3,18 +3,14 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Objects; +import java.util.*; +import java.util.stream.Collectors; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DtoConversionUtils; import com.ruoyi.common.utils.StringUtils; -import com.smartor.domain.BaseTag; -import com.smartor.domain.PatArchivetag; -import com.smartor.domain.PatUpInfoVO; +import com.smartor.domain.*; import com.smartor.mapper.BaseTagMapper; import com.smartor.mapper.PatArchivetagMapper; import org.apache.commons.collections4.CollectionUtils; @@ -24,9 +20,9 @@ import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.parameters.P; import org.springframework.stereotype.Service; import com.smartor.mapper.PatArchiveMapper; -import com.smartor.domain.PatArchive; import com.smartor.service.IPatArchiveService; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; @@ -313,6 +309,81 @@ return "瀵煎嚭鎴愬姛"; } + @Override + public List<PatArchive> patInfoByContion(PatArchiveReq patArchive) { + List<PatArchive> patArchives = new ArrayList<>(); + + //鏍规嵁鏉′欢鑾峰彇鎮h�呬俊鎭� + List<PatArchive> patArchiveList = patArchiveMapper.patInfoByContion(patArchive); + //鏍规嵁鎮h�匢D杩涜鍒嗙粍 + Map<Long, List<PatArchive>> listMap = patArchiveList.stream().collect(Collectors.groupingBy(PatArchive::getPatid)); + + //瀵规暟鎹繘琛屽皝瑁� + for (List<PatArchive> list : listMap.values()) { + PatArchive patArchive1 = new PatArchive(); + List<String> stringList = new ArrayList<>(); + for (int i = 0; i < list.size(); i++) { + if (i == 0) { + patArchive1 = DtoConversionUtils.sourceToTarget(list.get(0), PatArchive.class); + //灏嗘爣绛剧疆绌�,涓嶇┖涔熸病鏈夐棶棰� + patArchive1.setTag(""); + } + //灏嗘煡鍑虹殑tag锛屾斁鍒皃atArchive1閲岀殑TagList涓� + stringList.add(list.get(i).getTag()); + } + patArchive1.setTagList(stringList); + patArchives.add(patArchive1); + } + + return patArchives; + } + + @Override + public List<PatArchivetagAndPatientInfo> patTagByContion(List<Long> tagids) { + List<PatArchivetagAndPatientInfo> patArchivetagAndPatientInfos = new ArrayList<>(); + if (tagids.size() > 0) { + for (int i = 0; i < tagids.size(); i++) { + PatArchivetag patArchivetag = new PatArchivetag(); + patArchivetag.setTagid(tagids.get(i)); + //鑾峰彇鎮h�卲atid + List<PatArchivetag> patArchivetags1 = patArchivetagMapper.selectPatArchivetagAndBaseTagList(patArchivetag); + for (int j = 0; j < patArchivetags1.size(); j++) { + PatArchivetagAndPatientInfo patArchivetagAndPatientInfo = DtoConversionUtils.sourceToTarget(patArchivetags1.get(j), PatArchivetagAndPatientInfo.class); + PatArchive patArchive = new PatArchive(); + patArchive.setPatid(patArchivetagAndPatientInfo.getPatid()); + List<PatArchive> patArchiveList = patArchiveMapper.selectPatArchiveList(patArchive); + patArchivetagAndPatientInfo.setPatNum(patArchiveList.size()); + // patArchivetagAndPatientInfo.setPatArchives(patArchiveList); + patArchivetagAndPatientInfos.add(patArchivetagAndPatientInfo); + } + } + } else { + PatArchivetag patArchivetag = new PatArchivetag(); + //鑾峰彇鎮h�卲atid + List<PatArchivetag> patArchivetags1 = patArchivetagMapper.selectPatArchivetagAndBaseTagList(patArchivetag); + for (int j = 0; j < patArchivetags1.size(); j++) { + PatArchivetagAndPatientInfo patArchivetagAndPatientInfo = DtoConversionUtils.sourceToTarget(patArchivetags1.get(j), PatArchivetagAndPatientInfo.class); + PatArchive patArchive = new PatArchive(); + patArchive.setPatid(patArchivetagAndPatientInfo.getPatid()); + List<PatArchive> patArchiveList = patArchiveMapper.selectPatArchiveList(patArchive); + // patArchivetagAndPatientInfo.setPatArchives(patArchiveList); + patArchivetagAndPatientInfo.setPatNum(patArchiveList.size()); + patArchivetagAndPatientInfos.add(patArchivetagAndPatientInfo); + } + } + return patArchivetagAndPatientInfos; + } + + @Override + public List<PatArchivetagAndPatientInfo> patInfoByTag(List<Long> tagids) { + + + + + + return null; + } + private void getdata(Row row, PatArchive patArchive, Boolean head) { if (head) { row.createCell(0).setCellValue("濮撳悕"); diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchivetagServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatArchivetagServiceImpl.java index c610be5..7e61dc4 100644 --- a/smartor/src/main/java/com/smartor/service/impl/PatArchivetagServiceImpl.java +++ b/smartor/src/main/java/com/smartor/service/impl/PatArchivetagServiceImpl.java @@ -1,95 +1,96 @@ package com.smartor.service.impl; +import java.util.ArrayList; import java.util.List; + import com.ruoyi.common.utils.DateUtils; import com.smartor.domain.PatArchivetag; +import com.smartor.domain.PatArchivetagAndPatientInfo; +import com.smartor.mapper.PatArchiveMapper; import com.smartor.mapper.PatArchivetagMapper; import com.smartor.service.IPatArchivetagService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; + /** * 鎮h�呮。妗堟爣绛維ervice涓氬姟灞傚鐞� - * + * * @author ruoyi * @date 2023-06-02 */ @Service -public class PatArchivetagServiceImpl implements IPatArchivetagService -{ +public class PatArchivetagServiceImpl implements IPatArchivetagService { @Autowired private PatArchivetagMapper patArchivetagMapper; + /** * 鏌ヨ鎮h�呮。妗堟爣绛� - * + * * @param id 鎮h�呮。妗堟爣绛句富閿� * @return 鎮h�呮。妗堟爣绛� */ @Override - public PatArchivetag selectPatArchivetagById(Long id) - { + public PatArchivetag selectPatArchivetagById(Long id) { return patArchivetagMapper.selectPatArchivetagById(id); } /** * 鏌ヨ鎮h�呮。妗堟爣绛惧垪琛� - * + * * @param patArchivetag 鎮h�呮。妗堟爣绛� * @return 鎮h�呮。妗堟爣绛� */ @Override - public List<PatArchivetag> selectPatArchivetagList(PatArchivetag patArchivetag) - { + public List<PatArchivetag> selectPatArchivetagList(PatArchivetag patArchivetag) { return patArchivetagMapper.selectPatArchivetagList(patArchivetag); } /** * 鏂板鎮h�呮。妗堟爣绛� - * + * * @param patArchivetag 鎮h�呮。妗堟爣绛� * @return 缁撴灉 */ @Override - public int insertPatArchivetag(PatArchivetag patArchivetag) - { + public int insertPatArchivetag(PatArchivetag patArchivetag) { patArchivetag.setCreateTime(DateUtils.getNowDate()); return patArchivetagMapper.insertPatArchivetag(patArchivetag); } /** * 淇敼鎮h�呮。妗堟爣绛� - * + * * @param patArchivetag 鎮h�呮。妗堟爣绛� * @return 缁撴灉 */ @Override - public int updatePatArchivetag(PatArchivetag patArchivetag) - { + public int updatePatArchivetag(PatArchivetag patArchivetag) { patArchivetag.setUpdateTime(DateUtils.getNowDate()); return patArchivetagMapper.updatePatArchivetag(patArchivetag); } /** * 鎵归噺鍒犻櫎鎮h�呮。妗堟爣绛� - * + * * @param ids 闇�瑕佸垹闄ょ殑鎮h�呮。妗堟爣绛句富閿� * @return 缁撴灉 */ @Override - public int deletePatArchivetagByIds(Long[] ids) - { + public int deletePatArchivetagByIds(Long[] ids) { return patArchivetagMapper.deletePatArchivetagByIds(ids); } /** * 鍒犻櫎鎮h�呮。妗堟爣绛句俊鎭� - * + * * @param id 鎮h�呮。妗堟爣绛句富閿� * @return 缁撴灉 */ @Override - public int deletePatArchivetagById(Long id) - { + public int deletePatArchivetagById(Long id) { return patArchivetagMapper.deletePatArchivetagById(id); } + + } diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyLibTopicServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyLibTopicServiceImpl.java index 64d7f85..f0e7adc 100644 --- a/smartor/src/main/java/com/smartor/service/impl/SvyLibTopicServiceImpl.java +++ b/smartor/src/main/java/com/smartor/service/impl/SvyLibTopicServiceImpl.java @@ -2,13 +2,12 @@ import java.io.IOException; import java.util.*; +import java.util.stream.Collectors; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.StringUtils; -import com.smartor.domain.PatArchive; -import com.smartor.domain.SvyLibTopicRes; -import com.smartor.domain.SvyLibTopicoption; +import com.smartor.domain.*; import com.smartor.mapper.SvyLibTopicoptionMapper; import org.apache.catalina.User; import org.apache.commons.collections4.CollectionUtils; @@ -20,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.smartor.mapper.SvyLibTopicMapper; -import com.smartor.domain.SvyLibTopic; import com.smartor.service.ISvyLibTopicService; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; @@ -174,6 +172,18 @@ if (ObjectUtils.isNotEmpty(row.getCell(8))) { svyLibTopicRes.setScore(row.getCell(8).toString()); } + if (ObjectUtils.isNotEmpty(row.getCell(9))) { + svyLibTopicRes.setScore(row.getCell(9).toString()); + } + if (ObjectUtils.isNotEmpty(row.getCell(10))) { + svyLibTopicRes.setScore(row.getCell(10).toString()); + } + if (ObjectUtils.isNotEmpty(row.getCell(11))) { + svyLibTopicRes.setScore(row.getCell(11).toString()); + } + if (ObjectUtils.isNotEmpty(row.getCell(12))) { + svyLibTopicRes.setScore(row.getCell(12).toString()); + } if (StringUtils.isNotEmpty(svyLibTopicRes.getRemark())) { //璇存槑璇ヨ鏁版嵁鏈夐棶棰� svyLibTopicErrors.add(svyLibTopicRes); @@ -215,29 +225,69 @@ //瑙g瓟棰橈紝涓嶉渶瑕佸啀璁剧疆閫夐」 svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); } else { - if (ObjectUtils.isNotEmpty(row.getCell(4)) || StringUtils.isNotEmpty(row.getCell(4).toString())) { - svyLibTopicoption.setOptioncode("A"); - svyLibTopicoption.setOptioncontent(row.getCell(4).toString()); - svyLibTopicoption.setOptionid(null); - svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + if (ObjectUtils.isNotEmpty(row.getCell(4))) { + if (StringUtils.isNotEmpty(row.getCell(4).toString())) { + svyLibTopicoption.setOptioncode("A"); + svyLibTopicoption.setOptioncontent(row.getCell(4).toString()); + svyLibTopicoption.setOptionid(null); + svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + } } - if (ObjectUtils.isNotEmpty(row.getCell(5)) || StringUtils.isNotEmpty(row.getCell(5).toString())) { - svyLibTopicoption.setOptioncode("B"); - svyLibTopicoption.setOptioncontent(row.getCell(5).toString()); - svyLibTopicoption.setOptionid(null); - svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + if (ObjectUtils.isNotEmpty(row.getCell(5))) { + if (StringUtils.isNotEmpty(row.getCell(5).toString())) { + svyLibTopicoption.setOptioncode("B"); + svyLibTopicoption.setOptioncontent(row.getCell(5).toString()); + svyLibTopicoption.setOptionid(null); + svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + } } - if (ObjectUtils.isNotEmpty(row.getCell(6)) || StringUtils.isNotEmpty(row.getCell(6).toString())) { - svyLibTopicoption.setOptioncode("C"); - svyLibTopicoption.setOptioncontent(row.getCell(6).toString()); - svyLibTopicoption.setOptionid(null); - svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + if (ObjectUtils.isNotEmpty(row.getCell(6))) { + if (StringUtils.isNotEmpty(row.getCell(6).toString())) { + svyLibTopicoption.setOptioncode("C"); + svyLibTopicoption.setOptioncontent(row.getCell(6).toString()); + svyLibTopicoption.setOptionid(null); + svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + } } - if (ObjectUtils.isNotEmpty(row.getCell(7)) || StringUtils.isNotEmpty(row.getCell(7).toString())) { - svyLibTopicoption.setOptioncode("D"); - svyLibTopicoption.setOptioncontent(row.getCell(7).toString()); - svyLibTopicoption.setOptionid(null); - svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + if (ObjectUtils.isNotEmpty(row.getCell(7))) { + if (StringUtils.isNotEmpty(row.getCell(7).toString())) { + svyLibTopicoption.setOptioncode("D"); + svyLibTopicoption.setOptioncontent(row.getCell(7).toString()); + svyLibTopicoption.setOptionid(null); + svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + } + } + if (ObjectUtils.isNotEmpty(row.getCell(8))) { + if (StringUtils.isNotEmpty(row.getCell(8).toString())) { + svyLibTopicoption.setOptioncode("E"); + svyLibTopicoption.setOptioncontent(row.getCell(8).toString()); + svyLibTopicoption.setOptionid(null); + svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + } + } + if (ObjectUtils.isNotEmpty(row.getCell(9))) { + if (StringUtils.isNotEmpty(row.getCell(9).toString())) { + svyLibTopicoption.setOptioncode("F"); + svyLibTopicoption.setOptioncontent(row.getCell(9).toString()); + svyLibTopicoption.setOptionid(null); + svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + } + } + if (ObjectUtils.isNotEmpty(row.getCell(10))) { + if (StringUtils.isNotEmpty(row.getCell(10).toString())) { + svyLibTopicoption.setOptioncode("G"); + svyLibTopicoption.setOptioncontent(row.getCell(10).toString()); + svyLibTopicoption.setOptionid(null); + svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + } + } + if (ObjectUtils.isNotEmpty(row.getCell(11))) { + if (StringUtils.isNotEmpty(row.getCell(11).toString())) { + svyLibTopicoption.setOptioncode("H"); + svyLibTopicoption.setOptioncontent(row.getCell(11).toString()); + svyLibTopicoption.setOptionid(null); + svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption); + } } } } @@ -252,5 +302,13 @@ return null; } + @Override + public SvyLibTopicRes showTopic(SvyTopicReq svyTopicReq) { + List<SvyLibTopicAndOptionRes> svyLibTopicAndOptionRes = svyLibTopicMapper.showTopic(svyTopicReq); + Map<Long, List<SvyLibTopicAndOptionRes>> groupByAge = svyLibTopicAndOptionRes.stream().collect(Collectors.groupingBy(SvyLibTopicAndOptionRes::getTopicid)); + + return null; + } + } diff --git a/smartor/src/main/resources/mapper/smartor/BaseTagMapper.xml b/smartor/src/main/resources/mapper/smartor/BaseTagMapper.xml index f966209..e305fb2 100644 --- a/smartor/src/main/resources/mapper/smartor/BaseTagMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/BaseTagMapper.xml @@ -1,47 +1,60 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper -PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.smartor.mapper.BaseTagMapper"> - + <resultMap type="com.smartor.domain.BaseTag" id="BaseTagResult"> - <result property="tagid" column="tagid" /> - <result property="tagcategoryid" column="tagcategoryid" /> - <result property="tagname" column="tagname" /> - <result property="tagdescription" column="tagdescription" /> - <result property="orgid" column="orgid" /> - <result property="delFlag" column="del_flag" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="isupload" column="isupload" /> - <result property="uploadTime" column="upload_time" /> - <result property="isenable" column="isenable" /> + <result property="tagid" column="tagid"/> + <result property="tagcategoryid" column="tagcategoryid"/> + <result property="tagname" column="tagname"/> + <result property="tagdescription" column="tagdescription"/> + <result property="orgid" column="orgid"/> + <result property="delFlag" column="del_flag"/> + <result property="updateBy" column="update_by"/> + <result property="updateTime" column="update_time"/> + <result property="createBy" column="create_by"/> + <result property="createTime" column="create_time"/> + <result property="isupload" column="isupload"/> + <result property="uploadTime" column="upload_time"/> + <result property="isenable" column="isenable"/> </resultMap> <sql id="selectBaseTagVo"> - select tagid, tagcategoryid, tagname, tagdescription, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, isenable from base_tag + select tagid, + tagcategoryid, + tagname, + tagdescription, + orgid, + del_flag, + update_by, + update_time, + create_by, + create_time, + isupload, + upload_time, + isenable + from base_tag </sql> <select id="selectBaseTagList" parameterType="com.smartor.domain.BaseTag" resultMap="BaseTagResult"> <include refid="selectBaseTagVo"/> - <where> - <if test="tagcategoryid != null "> and tagcategoryid = #{tagcategoryid}</if> - <if test="tagname != null and tagname != ''"> and tagname like concat('%', #{tagname}, '%')</if> - <if test="tagdescription != null and tagdescription != ''"> and tagdescription = #{tagdescription}</if> - <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> - <if test="isupload != null "> and isupload = #{isupload}</if> - <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> - <if test="isenable != null "> and isenable = #{isenable}</if> + <where> + <if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if> + <if test="tagname != null and tagname != ''">and tagname like concat('%', #{tagname}, '%')</if> + <if test="tagdescription != null and tagdescription != ''">and tagdescription = #{tagdescription}</if> + <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> + <if test="isupload != null ">and isupload = #{isupload}</if> + <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> + <if test="isenable != null ">and isenable = #{isenable}</if> </where> </select> - + <select id="selectBaseTagByTagid" parameterType="Long" resultMap="BaseTagResult"> <include refid="selectBaseTagVo"/> where tagid = #{tagid} </select> - + <insert id="insertBaseTag" parameterType="com.smartor.domain.BaseTag" useGeneratedKeys="true" keyProperty="tagid"> insert into base_tag <trim prefix="(" suffix=")" suffixOverrides=","> @@ -57,7 +70,7 @@ <if test="isupload != null">isupload,</if> <if test="uploadTime != null">upload_time,</if> <if test="isenable != null">isenable,</if> - </trim> + </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="tagcategoryid != null">#{tagcategoryid},</if> <if test="tagname != null">#{tagname},</if> @@ -71,7 +84,7 @@ <if test="isupload != null">#{isupload},</if> <if test="uploadTime != null">#{uploadTime},</if> <if test="isenable != null">#{isenable},</if> - </trim> + </trim> </insert> <update id="updateBaseTag" parameterType="com.smartor.domain.BaseTag"> @@ -94,13 +107,16 @@ </update> <delete id="deleteBaseTagByTagid" parameterType="Long"> - delete from base_tag where tagid = #{tagid} + delete + from base_tag + where tagid = #{tagid} </delete> <delete id="deleteBaseTagByTagids" parameterType="String"> - delete from base_tag where tagid in + delete from base_tag where tagid in <foreach item="tagid" collection="array" open="(" separator="," close=")"> #{tagid} </foreach> </delete> + </mapper> \ No newline at end of file diff --git a/smartor/src/main/resources/mapper/smartor/BaseTagcategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/BaseTagcategoryMapper.xml new file mode 100644 index 0000000..99d50b3 --- /dev/null +++ b/smartor/src/main/resources/mapper/smartor/BaseTagcategoryMapper.xml @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE mapper + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.smartor.mapper.BaseTagcategoryMapper"> + + <resultMap type="com.smartor.domain.BaseTagcategory" id="BaseTagcategoryResult"> + <result property="tagcategoryid" column="tagcategoryid"/> + <result property="orgid" column="orgid"/> + <result property="updateBy" column="update_by"/> + <result property="updateTime" column="update_time"/> + <result property="pym" column="pym"/> + <result property="wbm" column="wbm"/> + <result property="delFlag" column="del_flag"/> + <result property="createBy" column="create_by"/> + <result property="createTime" column="create_time"/> + <result property="isupload" column="isupload"/> + <result property="uploadTime" column="upload_time"/> + <result property="categoryname" column="categoryname"/> + </resultMap> + + <sql id="selectBaseTagcategoryVo"> + select tagcategoryid, + orgid, + update_by, + update_time, + pym, + wbm, + del_flag, + create_by, + create_time, + isupload, + upload_time, + categoryname + from base_tagcategory + </sql> + + <select id="selectBaseTagcategoryList" parameterType="com.smartor.domain.BaseTagcategory" + resultMap="BaseTagcategoryResult"> + <include refid="selectBaseTagcategoryVo"/> + <where> + <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> + <if test="pym != null and pym != ''">and pym = #{pym}</if> + <if test="wbm != null and wbm != ''">and wbm = #{wbm}</if> + <if test="isupload != null ">and isupload = #{isupload}</if> + <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> + <if test="categoryname != null and categoryname != ''">and categoryname like concat('%', #{categoryname}, + '%') + </if> + </where> + </select> + + <select id="selectBaseTagcategoryByTagcategoryid" parameterType="Long" resultMap="BaseTagcategoryResult"> + <include refid="selectBaseTagcategoryVo"/> + where tagcategoryid = #{tagcategoryid} + </select> + + <insert id="insertBaseTagcategory" parameterType="com.smartor.domain.BaseTagcategory" useGeneratedKeys="true" + keyProperty="tagcategoryid"> + insert into base_tagcategory + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="orgid != null">orgid,</if> + <if test="updateBy != null">update_by,</if> + <if test="updateTime != null">update_time,</if> + <if test="pym != null">pym,</if> + <if test="wbm != null">wbm,</if> + <if test="delFlag != null and delFlag != ''">del_flag,</if> + <if test="createBy != null">create_by,</if> + <if test="createTime != null">create_time,</if> + <if test="isupload != null">isupload,</if> + <if test="uploadTime != null">upload_time,</if> + <if test="categoryname != null">categoryname,</if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="orgid != null">#{orgid},</if> + <if test="updateBy != null">#{updateBy},</if> + <if test="updateTime != null">#{updateTime},</if> + <if test="pym != null">#{pym},</if> + <if test="wbm != null">#{wbm},</if> + <if test="delFlag != null and delFlag != ''">#{delFlag},</if> + <if test="createBy != null">#{createBy},</if> + <if test="createTime != null">#{createTime},</if> + <if test="isupload != null">#{isupload},</if> + <if test="uploadTime != null">#{uploadTime},</if> + <if test="categoryname != null">#{categoryname},</if> + </trim> + </insert> + + <update id="updateBaseTagcategory" parameterType="com.smartor.domain.BaseTagcategory"> + update base_tagcategory + <trim prefix="SET" suffixOverrides=","> + <if test="orgid != null">orgid = #{orgid},</if> + <if test="updateBy != null">update_by = #{updateBy},</if> + <if test="updateTime != null">update_time = #{updateTime},</if> + <if test="pym != null">pym = #{pym},</if> + <if test="wbm != null">wbm = #{wbm},</if> + <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if> + <if test="createBy != null">create_by = #{createBy},</if> + <if test="createTime != null">create_time = #{createTime},</if> + <if test="isupload != null">isupload = #{isupload},</if> + <if test="uploadTime != null">upload_time = #{uploadTime},</if> + <if test="categoryname != null">categoryname = #{categoryname},</if> + </trim> + where tagcategoryid = #{tagcategoryid} + </update> + + <delete id="deleteBaseTagcategoryByTagcategoryid" parameterType="java.lang.Long"> + delete + from base_tagcategory + where tagcategoryid = #{tagcategoryid} + </delete> + + <delete id="deleteBaseTagcategoryByTagcategoryids" parameterType="java.lang.String"> + delete from base_tagcategory where tagcategoryid in + <foreach item="tagcategoryid" collection="array" open="(" separator="," close=")"> + #{tagcategoryid} + </foreach> + </delete> + + <select id="baseTagCategoryByName" parameterType="java.lang.String" + resultType="com.smartor.domain.BaseTagcategory"> + select a.tagcategoryid, + a.orgid, + a.update_by, + a.update_time, + a.pym, + a.wbm, + a.del_flag, + a.create_by, + a.create_time, + a.isupload, + a.upload_time, + a.categoryname, + count(b.tagid) as tagNum + from base_tagcategory a,base_tag b + <where> + a.tagcategoryid = b.tagcategoryid + <if test="categoryname != null and categoryname != ''">and a.categoryname like concat('%', #{categoryname}, + '%') + </if> + </where> + GROUP BY a.categoryname + </select> +</mapper> \ No newline at end of file diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml index 8dd64f2..400feeb 100644 --- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml @@ -1,56 +1,103 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper -PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.smartor.mapper.PatArchiveMapper"> - - <resultMap type="PatArchive" id="PatArchiveResult"> - <result property="patid" column="patid" /> - <result property="name" column="name" /> - <result property="sex" column="sex" /> - <result property="iccardno" column="iccardno" /> - <result property="birthdate" column="birthdate" /> - <result property="age" column="age" /> - <result property="source" column="source" /> - <result property="archivetime" column="archivetime" /> - <result property="archiveby" column="archiveby" /> - <result property="telcode" column="telcode" /> - <result property="relativetelcode" column="relativetelcode" /> - <result property="iccardtype" column="iccardtype" /> - <result property="orgid" column="orgid" /> - <result property="openid" column="openid" /> - <result property="delFlag" column="del_flag" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="isupload" column="isupload" /> - <result property="uploadTime" column="upload_time" /> + + <resultMap type="com.smartor.domain.PatArchive" id="PatArchiveResult"> + <result property="patid" column="patid"/> + <result property="name" column="name"/> + <result property="sex" column="sex"/> + <result property="iccardno" column="iccardno"/> + <result property="birthdate" column="birthdate"/> + <result property="age" column="age"/> + <result property="source" column="source"/> + <result property="archivetime" column="archivetime"/> + <result property="archiveby" column="archiveby"/> + <result property="telcode" column="telcode"/> + <result property="relativetelcode" column="relativetelcode"/> + <result property="iccardtype" column="iccardtype"/> + <result property="orgid" column="orgid"/> + <result property="openid" column="openid"/> + <result property="delFlag" column="del_flag"/> + <result property="updateBy" column="update_by"/> + <result property="updateTime" column="update_time"/> + <result property="createBy" column="create_by"/> + <result property="createTime" column="create_time"/> + <result property="isupload" column="isupload"/> + <result property="uploadTime" column="upload_time"/> + <result property="tag" column="tag"/> </resultMap> <sql id="selectPatArchiveVo"> - select patid, name, sex, iccardno, birthdate, age, source, archivetime, archiveby, telcode, relativetelcode, iccardtype, orgid, openid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time from pat_archive + select patid, + name, + sex, + iccardno, + birthdate, + age, + source, + archivetime, + archiveby, + telcode, + relativetelcode, + iccardtype, + orgid, + openid, + del_flag, + update_by, + update_time, + create_by, + create_time, + isupload, + upload_time + from pat_archive </sql> - <select id="selectPatArchiveList" parameterType="PatArchive" resultMap="PatArchiveResult"> + <select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult"> <include refid="selectPatArchiveVo"/> - <where> - <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> - <if test="iccardno != null and iccardno != ''"> and iccardno = #{iccardno}</if> - <if test="source != null "> and source = #{source}</if> - <if test="telcode != null and telcode != ''"> and telcode = #{telcode}</if> - <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> - <if test="isupload != null "> and isupload = #{isupload}</if> - <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> + <where> + <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> + <if test="iccardno != null and iccardno != ''">and iccardno = #{iccardno}</if> + <if test="source != null ">and source = #{source}</if> + <if test="telcode != null and telcode != ''">and telcode = #{telcode}</if> + <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> + <if test="patid != null and patid != ''">and patid = #{patid}</if> + <if test="isupload != null ">and isupload = #{isupload}</if> + <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> </where> </select> - + + + <select id="patInfoByContion" parameterType="com.smartor.domain.PatArchiveReq" resultMap="PatArchiveResult"> + select + a.patid, + a.name, + a.sex, + c.tagname as tag, + a.iccardtype, + a.iccardno, + a.age, + a.telcode, + a.create_time, + a.update_time, + a.birthdate + from pat_archive a,pat_archivetag b ,base_tag c + <where> + a.patid = b.patid and b.tagid = c.tagid + <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> + <if test="iccardno != null and iccardno != ''">and iccardno = #{iccardno}</if> + <if test="telcode != null and telcode != ''">and telcode = #{telcode}</if> + <if test="tagId != null and tagId != ''">and c.tagid = #{tagId}</if> + </where> + </select> + <select id="selectPatArchiveByPatid" parameterType="Long" resultMap="PatArchiveResult"> <include refid="selectPatArchiveVo"/> where patid = #{patid} </select> - - <insert id="insertPatArchive" parameterType="PatArchive" useGeneratedKeys="true" keyProperty="patid"> + + <insert id="insertPatArchive" parameterType="com.smartor.domain.PatArchive" useGeneratedKeys="true" keyProperty="patid"> insert into pat_archive <trim prefix="(" suffix=")" suffixOverrides=","> <if test="name != null">name,</if> @@ -73,7 +120,7 @@ <if test="createTime != null">create_time,</if> <if test="isupload != null">isupload,</if> <if test="uploadTime != null">upload_time,</if> - </trim> + </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="name != null">#{name},</if> <if test="sex != null">#{sex},</if> @@ -95,10 +142,10 @@ <if test="createTime != null">#{createTime},</if> <if test="isupload != null">#{isupload},</if> <if test="uploadTime != null">#{uploadTime},</if> - </trim> + </trim> </insert> - <update id="updatePatArchive" parameterType="PatArchive"> + <update id="updatePatArchive" parameterType="com.smartor.domain.PatArchive"> update pat_archive <trim prefix="SET" suffixOverrides=","> <if test="name != null">name = #{name},</if> @@ -126,13 +173,16 @@ </update> <delete id="deletePatArchiveByPatid" parameterType="Long"> - delete from pat_archive where patid = #{patid} + delete + from pat_archive + where patid = #{patid} </delete> <delete id="deletePatArchiveByPatids" parameterType="String"> - delete from pat_archive where patid in + delete from pat_archive where patid in <foreach item="patid" collection="array" open="(" separator="," close=")"> #{patid} </foreach> </delete> + </mapper> \ No newline at end of file diff --git a/smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml index b417d17..2b532bf 100644 --- a/smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml @@ -17,6 +17,7 @@ <result property="isupload" column="isupload"/> <result property="uploadTime" column="upload_time"/> <result property="patid" column="patid"/> + <result property="tagname" column="tagname"/> </resultMap> <sql id="selectPatArchivetagVo"> @@ -48,6 +49,34 @@ </where> </select> + + <select id="selectPatArchivetagAndBaseTagList" parameterType="com.smartor.domain.PatArchivetag" + resultMap="PatArchivetagResult"> + select a.id, + a.tagcategoryid, + a.tagid, + a.orgid, + a. del_flag, + a.update_by, + a.update_time, + a.create_by, + a.create_time, + a.isupload, + a.upload_time, + a.patid, + b.tagname + from pat_archivetag a ,base_tag b + <where> + a.tagid=b.tagid + <if test="tagcategoryid != null ">and a.tagcategoryid = #{tagcategoryid}</if> + <if test="tagid != null ">and b.tagid = #{tagid}</if> + <if test="orgid != null and orgid != ''">and a.orgid = #{orgid}</if> + <if test="isupload != null ">and a.isupload = #{isupload}</if> + <if test="uploadTime != null ">and a.upload_time = #{uploadTime}</if> + <if test="patid != null ">and a.patid = #{patid}</if> + </where> + </select> + <select id="selectPatArchivetagById" parameterType="Long" resultMap="PatArchivetagResult"> <include refid="selectPatArchivetagVo"/> where id = #{id} diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTopicMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTopicMapper.xml index e2cb1e5..d02d1fc 100644 --- a/smartor/src/main/resources/mapper/smartor/SvyLibTopicMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/SvyLibTopicMapper.xml @@ -64,6 +64,7 @@ <if test="updateTime != null">update_time,</if> <if test="isupload != null">isupload,</if> <if test="uploadTime != null">upload_time,</if> + <if test="tag != null">tag,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="oldid != null">#{oldid},</if> @@ -82,6 +83,7 @@ <if test="updateTime != null">#{updateTime},</if> <if test="isupload != null">#{isupload},</if> <if test="uploadTime != null">#{uploadTime},</if> + <if test="tag != null">#{tag},</if> </trim> </insert> @@ -118,4 +120,22 @@ #{topicid} </foreach> </delete> + + <select id="showTopic" resultType="com.smartor.domain.SvyLibTopicAndOptionRes" + parameterType="com.smartor.domain.SvyTopicReq"> + SELECT a.topicid, a.topiccode, a.topic, a.topictype, a.tag, b.optioncode, b.optioncontent + FROM svy_lib_topic a, + svy_lib_topicoption b + WHERE a.topicid = b.topicid + <if test="topic != null and topic != ''"> + and a.topic LIKE concat('%', #{topic}, '%') + </if> + <if test="topicType != null and topicType != ''"> + and a.topictype = #{topicType} + </if> + <if test="tag != null and tag != ''"> + and a.tag LIKE concat('%', #{tag}, '%') + </if> + GROUP BY a.topic, b.optioncode + </select> </mapper> \ No newline at end of file diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTopicoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTopicoptionMapper.xml index 1e08074..ac18933 100644 --- a/smartor/src/main/resources/mapper/smartor/SvyLibTopicoptionMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/SvyLibTopicoptionMapper.xml @@ -1,84 +1,116 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper -PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.smartor.mapper.SvyLibTopicoptionMapper"> - + <resultMap type="SvyLibTopicoption" id="SvyLibTopicoptionResult"> - <result property="optionid" column="optionid" /> - <result property="topicid" column="topicid" /> - <result property="svyid" column="svyid" /> - <result property="topictype" column="topictype" /> - <result property="optioncode" column="optioncode" /> - <result property="optioncontent" column="optioncontent" /> - <result property="isexistdetail" column="isexistdetail" /> - <result property="detailismandatory" column="detailismandatory" /> - <result property="isexceptionitem" column="isexceptionitem" /> - <result property="istrack" column="istrack" /> - <result property="score" column="score" /> - <result property="prompt" column="prompt" /> - <result property="jump" column="jump" /> - <result property="parentoptionid" column="parentoptionid" /> - <result property="ismutex" column="ismutex" /> - <result property="verifyrule" column="verifyrule" /> - <result property="sort" column="sort" /> - <result property="verificationtype" column="verificationtype" /> - <result property="isrange" column="isrange" /> - <result property="minrange" column="minrange" /> - <result property="maxrange" column="maxrange" /> - <result property="rangelength" column="rangelength" /> - <result property="orgid" column="orgid" /> - <result property="oldid" column="oldid" /> - <result property="delFlag" column="del_flag" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="isupload" column="isupload" /> - <result property="uploadTime" column="upload_time" /> + <result property="optionid" column="optionid"/> + <result property="topicid" column="topicid"/> + <result property="svyid" column="svyid"/> + <result property="topictype" column="topictype"/> + <result property="optioncode" column="optioncode"/> + <result property="optioncontent" column="optioncontent"/> + <result property="isexistdetail" column="isexistdetail"/> + <result property="detailismandatory" column="detailismandatory"/> + <result property="isexceptionitem" column="isexceptionitem"/> + <result property="istrack" column="istrack"/> + <result property="score" column="score"/> + <result property="prompt" column="prompt"/> + <result property="jump" column="jump"/> + <result property="parentoptionid" column="parentoptionid"/> + <result property="ismutex" column="ismutex"/> + <result property="verifyrule" column="verifyrule"/> + <result property="sort" column="sort"/> + <result property="verificationtype" column="verificationtype"/> + <result property="isrange" column="isrange"/> + <result property="minrange" column="minrange"/> + <result property="maxrange" column="maxrange"/> + <result property="rangelength" column="rangelength"/> + <result property="orgid" column="orgid"/> + <result property="oldid" column="oldid"/> + <result property="delFlag" column="del_flag"/> + <result property="createBy" column="create_by"/> + <result property="createTime" column="create_time"/> + <result property="updateBy" column="update_by"/> + <result property="updateTime" column="update_time"/> + <result property="isupload" column="isupload"/> + <result property="uploadTime" column="upload_time"/> </resultMap> <sql id="selectSvyLibTopicoptionVo"> - select optionid, topicid, svyid, topictype, optioncode, optioncontent, isexistdetail, detailismandatory, isexceptionitem, istrack, score, prompt, jump, parentoptionid, ismutex, verifyrule, sort, verificationtype, isrange, minrange, maxrange, rangelength, orgid, oldid, del_flag, create_by, create_time, update_by, update_time, isupload, upload_time from svy_lib_topicoption + select optionid, + topicid, + svyid, + topictype, + optioncode, + optioncontent, + isexistdetail, + detailismandatory, + isexceptionitem, + istrack, + score, + prompt, + jump, + parentoptionid, + ismutex, + verifyrule, + sort, + verificationtype, + isrange, + minrange, + maxrange, + rangelength, + orgid, + oldid, + del_flag, + create_by, + create_time, + update_by, + update_time, + isupload, + upload_time + from svy_lib_topicoption </sql> <select id="selectSvyLibTopicoptionList" parameterType="SvyLibTopicoption" resultMap="SvyLibTopicoptionResult"> <include refid="selectSvyLibTopicoptionVo"/> - <where> - <if test="topicid != null "> and topicid = #{topicid}</if> - <if test="svyid != null "> and svyid = #{svyid}</if> - <if test="topictype != null "> and topictype = #{topictype}</if> - <if test="optioncode != null and optioncode != ''"> and optioncode = #{optioncode}</if> - <if test="optioncontent != null and optioncontent != ''"> and optioncontent = #{optioncontent}</if> - <if test="isexistdetail != null "> and isexistdetail = #{isexistdetail}</if> - <if test="detailismandatory != null "> and detailismandatory = #{detailismandatory}</if> - <if test="isexceptionitem != null "> and isexceptionitem = #{isexceptionitem}</if> - <if test="istrack != null "> and istrack = #{istrack}</if> - <if test="score != null "> and score = #{score}</if> - <if test="prompt != null and prompt != ''"> and prompt = #{prompt}</if> - <if test="jump != null and jump != ''"> and jump = #{jump}</if> - <if test="parentoptionid != null "> and parentoptionid = #{parentoptionid}</if> - <if test="ismutex != null "> and ismutex = #{ismutex}</if> - <if test="verifyrule != null and verifyrule != ''"> and verifyrule = #{verifyrule}</if> - <if test="sort != null "> and sort = #{sort}</if> - <if test="verificationtype != null "> and verificationtype = #{verificationtype}</if> - <if test="isrange != null "> and isrange = #{isrange}</if> - <if test="minrange != null and minrange != ''"> and minrange = #{minrange}</if> - <if test="maxrange != null and maxrange != ''"> and maxrange = #{maxrange}</if> - <if test="rangelength != null "> and rangelength = #{rangelength}</if> - <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> - <if test="oldid != null "> and oldid = #{oldid}</if> - <if test="isupload != null "> and isupload = #{isupload}</if> - <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> + <where> + <if test="topicid != null ">and topicid = #{topicid}</if> + <if test="svyid != null ">and svyid = #{svyid}</if> + <if test="topictype != null ">and topictype = #{topictype}</if> + <if test="optioncode != null and optioncode != ''">and optioncode = #{optioncode}</if> + <if test="optioncontent != null and optioncontent != ''">and optioncontent = #{optioncontent}</if> + <if test="isexistdetail != null ">and isexistdetail = #{isexistdetail}</if> + <if test="detailismandatory != null ">and detailismandatory = #{detailismandatory}</if> + <if test="isexceptionitem != null ">and isexceptionitem = #{isexceptionitem}</if> + <if test="istrack != null ">and istrack = #{istrack}</if> + <if test="score != null ">and score = #{score}</if> + <if test="prompt != null and prompt != ''">and prompt = #{prompt}</if> + <if test="jump != null and jump != ''">and jump = #{jump}</if> + <if test="parentoptionid != null ">and parentoptionid = #{parentoptionid}</if> + <if test="ismutex != null ">and ismutex = #{ismutex}</if> + <if test="verifyrule != null and verifyrule != ''">and verifyrule = #{verifyrule}</if> + <if test="sort != null ">and sort = #{sort}</if> + <if test="verificationtype != null ">and verificationtype = #{verificationtype}</if> + <if test="isrange != null ">and isrange = #{isrange}</if> + <if test="minrange != null and minrange != ''">and minrange = #{minrange}</if> + <if test="maxrange != null and maxrange != ''">and maxrange = #{maxrange}</if> + <if test="rangelength != null ">and rangelength = #{rangelength}</if> + <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> + <if test="oldid != null ">and oldid = #{oldid}</if> + <if test="isupload != null ">and isupload = #{isupload}</if> + <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> </where> </select> - + <select id="selectSvyLibTopicoptionByOptionid" parameterType="Long" resultMap="SvyLibTopicoptionResult"> <include refid="selectSvyLibTopicoptionVo"/> where optionid = #{optionid} </select> - - <insert id="insertSvyLibTopicoption" parameterType="SvyLibTopicoption" useGeneratedKeys="true" keyProperty="optionid"> + + <insert id="insertSvyLibTopicoption" parameterType="SvyLibTopicoption" useGeneratedKeys="true" + keyProperty="optionid"> insert into svy_lib_topicoption <trim prefix="(" suffix=")" suffixOverrides=","> <if test="topicid != null">topicid,</if> @@ -111,7 +143,7 @@ <if test="updateTime != null">update_time,</if> <if test="isupload != null">isupload,</if> <if test="uploadTime != null">upload_time,</if> - </trim> + </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="topicid != null">#{topicid},</if> <if test="svyid != null">#{svyid},</if> @@ -143,7 +175,7 @@ <if test="updateTime != null">#{updateTime},</if> <if test="isupload != null">#{isupload},</if> <if test="uploadTime != null">#{uploadTime},</if> - </trim> + </trim> </insert> <update id="updateSvyLibTopicoption" parameterType="SvyLibTopicoption"> @@ -184,13 +216,17 @@ </update> <delete id="deleteSvyLibTopicoptionByOptionid" parameterType="Long"> - delete from svy_lib_topicoption where optionid = #{optionid} + delete + from svy_lib_topicoption + where optionid = #{optionid} </delete> <delete id="deleteSvyLibTopicoptionByOptionids" parameterType="String"> - delete from svy_lib_topicoption where optionid in + delete from svy_lib_topicoption where optionid in <foreach item="optionid" collection="array" open="(" separator="," close=")"> #{optionid} </foreach> </delete> + + </mapper> \ No newline at end of file -- Gitblit v1.9.3