From e52b0e34fc06372aab64c30b526ec289b99c9af7 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期三, 19 六月 2024 10:43:47 +0800 Subject: [PATCH] 代码提交 --- smartor/src/main/java/com/smartor/service/impl/SvyLibScriptServiceImpl.java | 10 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/QRCodeController.java | 40 smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java | 131 ++- smartor/src/main/java/com/smartor/domain/IvrLibaScript.java | 7 smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java | 9 smartor/src/main/java/com/smartor/domain/SvyLibScript.java | 21 smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateScriptServiceImpl.java | 97 +++ smartor/src/main/resources/mapper/smartor/SvyTaskScriptMapper.xml | 9 smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml | 230 +++++++ smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml | 29 ruoyi-admin/src/main/java/com/ruoyi/web/controller/socket/SocketCommunication.java | 6 smartor/src/main/java/com/smartor/domain/IvrLibaScriptVO.java | 7 smartor/src/main/java/com/smartor/service/ISvyLibTemplateScriptService.java | 62 + smartor/src/main/java/com/smartor/service/ISvyLibTemplateService.java | 14 smartor/src/main/java/com/smartor/mapper/SvyLibTemplateTargetoptionMapper.java | 63 + smartor/src/main/java/com/smartor/mapper/SvyLibTemplateScriptMapper.java | 63 + smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateTargetoptionServiceImpl.java | 90 ++ smartor/src/main/java/com/smartor/domain/SvyTaskScript.java | 6 smartor/src/main/java/com/smartor/domain/SvyLibTemplateScript.java | 233 +++++++ smartor/src/main/java/com/smartor/domain/SvyLibTemplateTargetoption.java | 239 +++++++ smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml | 12 smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml | 5 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java | 16 smartor/src/main/java/com/smartor/domain/SvyLibTemplate.java | 11 smartor/src/main/java/com/smartor/service/ISvyLibTemplateTargetoptionService.java | 61 + smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml | 222 ++++++ ruoyi-admin/src/main/resources/application-druid.yml | 7 ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java | 5 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateScriptController.java | 98 +++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateTargetoptionController.java | 98 +++ 30 files changed, 1,792 insertions(+), 109 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java index 337498b..6429cb2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java @@ -97,6 +97,11 @@ public void onMessage(Message message, byte[] pattern) { log.info("鐩戝惉Redis key杩囨湡锛宬ey锛歿}锛宑hannel锛歿}", message.toString(), new String(pattern)); String content = message.toString(); + //鍒ゆ柇鏄笉鏄换鍔′俊鎭紝濡傛灉涓嶆槸锛岀洿鎺ヨ繑鍥烇紝涓嶉渶瑕佹墽琛� + if (!content.contains("taskid")) { + log.info("涓嶆槸浠诲姟淇℃伅"); + return; + } IvrTaskcallMQ ivrTaskcallMQ = null; try { ObjectMapper mapper = new ObjectMapper(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/QRCodeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/QRCodeController.java index b07c281..ef46ef6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/QRCodeController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/QRCodeController.java @@ -5,6 +5,9 @@ import com.google.zxing.client.j2se.MatrixToImageWriter; import com.google.zxing.common.BitMatrix; import com.google.zxing.qrcode.QRCodeWriter; +import com.mchange.v2.uid.UidUtils; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.framework.config.ServerConfig; import com.smartor.domain.Question; import com.smartor.domain.SvyLibTemplate; import freemarker.template.Configuration; @@ -12,6 +15,9 @@ import freemarker.template.TemplateException; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.*; @@ -19,11 +25,9 @@ import java.io.File; import java.io.IOException; import java.io.StringWriter; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; +@Slf4j @Api(description = "闂嵎浜岀淮鐮�") @RestController @RequestMapping("/qrcode") @@ -34,6 +38,12 @@ public QRCodeController(Configuration configuration) { this.configuration = configuration; } + + @Value("${ruoyi.profile}") + private String profile; + + @Autowired + private ServerConfig serverConfig; /** * 闂嵎棰樼洰 @@ -105,18 +115,22 @@ } /** - * @param reqid 闂嵎ID - * @param userid 鐢ㄦ埛ID + * @param url 闂嵎ID + * @param url 鐢ㄦ埛ID */ @ApiOperation("鑾峰彇闂嵎浜岀淮鐮�") - @GetMapping(value = "/getQRcode/{reqid}/{userid}") - public void getQRcode(@PathVariable("reqid") String reqid, @PathVariable("userid") String userid) { - String url = "http://192.168.2.10:8080/smartor/svytitle/generateStaticHtml"; - String filePath = "D:\\daima\\qrcode.png"; // 淇濆瓨浜岀淮鐮佸浘鍍忕殑鏂囦欢璺緞 - + @PostMapping(value = "/getQRcode") + public AjaxResult getQRcode(@RequestParam("url") String url) { + log.info("鑾峰彇闂嵎浜岀淮鐮佺殑鍏ュ弬锛歿}", url); + String uuid = UUID.randomUUID().toString().replace("-", ""); + String filePath = profile + "\\qrpath" + "\\" + uuid + ".png"; // 淇濆瓨浜岀淮鐮佸浘鍍忕殑鏂囦欢璺緞 + //鍒ゆ柇鏂囦欢澶规槸鍚﹀瓨鍦� + File file = new File(profile + "\\qrpath"); + if (!file.exists()) { + file.mkdirs(); + } generateQRCode(url, filePath); - - System.out.println("QR Code generated successfully!"); + return AjaxResult.success(serverConfig.getUrl() + "/profile/qrpath/" + uuid + ".png"); } private void generateQRCode(String url, String filePath) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java index aad703f..cab5eea 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java @@ -55,14 +55,14 @@ // return success(svyLibTemplateService.selectSvyLibTemplateBySvyid(svyid)); // } - /** - * 鏂板闂嵎 - */ - @ApiOperation("鏂板闂嵎") - @PostMapping("/addSvyLibTemplate") - public AjaxResult addSvyLibTemplate(@RequestBody SvyLibTemplate svyLibTemplate) { - return toAjax(svyLibTemplateService.insertSvyLibTemplate(svyLibTemplate)); - } +// /** +// * 鏂板闂嵎 +// */ +// @ApiOperation("鏂板闂嵎") +// @PostMapping("/addSvyLibTemplate") +// public AjaxResult addSvyLibTemplate(@RequestBody SvyLibTemplate svyLibTemplate) { +// return toAjax(svyLibTemplateService.insertSvyLibTemplate(svyLibTemplate)); +// } /** * 鏂板鎴栦慨鏀归棶鍗锋ā鏉夸俊鎭� diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateScriptController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateScriptController.java new file mode 100644 index 0000000..430942d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateScriptController.java @@ -0,0 +1,98 @@ +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.SvyLibTemplateScript; +import com.smartor.service.ISvyLibTemplateScriptService; +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 ls + * @date 2024-06-18 + */ +@RestController +@RequestMapping("/smartor/svytemplatescript") +public class SvyLibTemplateScriptController extends BaseController +{ + @Autowired + private ISvyLibTemplateScriptService svyLibTemplateScriptService; + + /** + * 鏌ヨ妯℃澘闂嵎棰樼洰鍒楄〃 + */ + @PreAuthorize("@ss.hasPermi('system:script:list')") + @GetMapping("/list") + public TableDataInfo list(SvyLibTemplateScript svyLibTemplateScript) + { + startPage(); + List<SvyLibTemplateScript> list = svyLibTemplateScriptService.selectSvyLibTemplateScriptList(svyLibTemplateScript); + return getDataTable(list); + } + + /** + * 瀵煎嚭妯℃澘闂嵎棰樼洰鍒楄〃 + */ + @PreAuthorize("@ss.hasPermi('system:script:export')") + @Log(title = "妯℃澘闂嵎棰樼洰", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SvyLibTemplateScript svyLibTemplateScript) + { + List<SvyLibTemplateScript> list = svyLibTemplateScriptService.selectSvyLibTemplateScriptList(svyLibTemplateScript); + ExcelUtil<SvyLibTemplateScript> util = new ExcelUtil<SvyLibTemplateScript>(SvyLibTemplateScript.class); + util.exportExcel(response, list, "妯℃澘闂嵎棰樼洰鏁版嵁"); + } + + /** + * 鑾峰彇妯℃澘闂嵎棰樼洰璇︾粏淇℃伅 + */ + @PreAuthorize("@ss.hasPermi('system:script:query')") + @GetMapping(value = "/{topicid}") + public AjaxResult getInfo(@PathVariable("topicid") Long topicid) + { + return success(svyLibTemplateScriptService.selectSvyLibTemplateScriptByTopicid(topicid)); + } + + /** + * 鏂板妯℃澘闂嵎棰樼洰 + */ + @PreAuthorize("@ss.hasPermi('system:script:add')") + @Log(title = "妯℃澘闂嵎棰樼洰", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SvyLibTemplateScript svyLibTemplateScript) + { + return toAjax(svyLibTemplateScriptService.insertSvyLibTemplateScript(svyLibTemplateScript)); + } + + /** + * 淇敼妯℃澘闂嵎棰樼洰 + */ + @PreAuthorize("@ss.hasPermi('system:script:edit')") + @Log(title = "妯℃澘闂嵎棰樼洰", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SvyLibTemplateScript svyLibTemplateScript) + { + return toAjax(svyLibTemplateScriptService.updateSvyLibTemplateScript(svyLibTemplateScript)); + } + + /** + * 鍒犻櫎妯℃澘闂嵎棰樼洰 + */ + @PreAuthorize("@ss.hasPermi('system:script:remove')") + @Log(title = "妯℃澘闂嵎棰樼洰", businessType = BusinessType.DELETE) + @DeleteMapping("/{topicids}") + public AjaxResult remove(@PathVariable Long[] topicids) + { + return toAjax(svyLibTemplateScriptService.deleteSvyLibTemplateScriptByTopicids(topicids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateTargetoptionController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateTargetoptionController.java new file mode 100644 index 0000000..96c425e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateTargetoptionController.java @@ -0,0 +1,98 @@ +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.SvyLibTemplateTargetoption; +import com.smartor.service.ISvyLibTemplateTargetoptionService; +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; + +/** + * 闂嵎闂鎸囨爣閫夐」搴揅ontroller + * + * @author ruoyi + * @date 2024-06-18 + */ +@RestController +@RequestMapping("/smartor/svytargetoption") +public class SvyLibTemplateTargetoptionController extends BaseController +{ + @Autowired + private ISvyLibTemplateTargetoptionService svyLibTemplateTargetoptionService; + + /** + * 鏌ヨ闂嵎闂鎸囨爣閫夐」搴撳垪琛� + */ + @PreAuthorize("@ss.hasPermi('system:targetoption:list')") + @GetMapping("/list") + public TableDataInfo list(SvyLibTemplateTargetoption svyLibTemplateTargetoption) + { + startPage(); + List<SvyLibTemplateTargetoption> list = svyLibTemplateTargetoptionService.selectSvyLibTemplateTargetoptionList(svyLibTemplateTargetoption); + return getDataTable(list); + } + + /** + * 瀵煎嚭闂嵎闂鎸囨爣閫夐」搴撳垪琛� + */ + @PreAuthorize("@ss.hasPermi('system:targetoption:export')") + @Log(title = "闂嵎闂鎸囨爣閫夐」搴�", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SvyLibTemplateTargetoption svyLibTemplateTargetoption) + { + List<SvyLibTemplateTargetoption> list = svyLibTemplateTargetoptionService.selectSvyLibTemplateTargetoptionList(svyLibTemplateTargetoption); + ExcelUtil<SvyLibTemplateTargetoption> util = new ExcelUtil<SvyLibTemplateTargetoption>(SvyLibTemplateTargetoption.class); + util.exportExcel(response, list, "闂嵎闂鎸囨爣閫夐」搴撴暟鎹�"); + } + + /** + * 鑾峰彇闂嵎闂鎸囨爣閫夐」搴撹缁嗕俊鎭� + */ + @PreAuthorize("@ss.hasPermi('system:targetoption:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(svyLibTemplateTargetoptionService.selectSvyLibTemplateTargetoptionById(id)); + } + + /** + * 鏂板闂嵎闂鎸囨爣閫夐」搴� + */ + @PreAuthorize("@ss.hasPermi('system:targetoption:add')") + @Log(title = "闂嵎闂鎸囨爣閫夐」搴�", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SvyLibTemplateTargetoption svyLibTemplateTargetoption) + { + return toAjax(svyLibTemplateTargetoptionService.insertSvyLibTemplateTargetoption(svyLibTemplateTargetoption)); + } + + /** + * 淇敼闂嵎闂鎸囨爣閫夐」搴� + */ + @PreAuthorize("@ss.hasPermi('system:targetoption:edit')") + @Log(title = "闂嵎闂鎸囨爣閫夐」搴�", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SvyLibTemplateTargetoption svyLibTemplateTargetoption) + { + return toAjax(svyLibTemplateTargetoptionService.updateSvyLibTemplateTargetoption(svyLibTemplateTargetoption)); + } + + /** + * 鍒犻櫎闂嵎闂鎸囨爣閫夐」搴� + */ + @PreAuthorize("@ss.hasPermi('system:targetoption:remove')") + @Log(title = "闂嵎闂鎸囨爣閫夐」搴�", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(svyLibTemplateTargetoptionService.deleteSvyLibTemplateTargetoptionByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/socket/SocketCommunication.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/socket/SocketCommunication.java index 65d84fc..57e3dd3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/socket/SocketCommunication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/socket/SocketCommunication.java @@ -7,7 +7,6 @@ import com.ruoyi.common.utils.StringUtils; import com.smartor.service.impl.RemoteDataSaveServiceImpl; import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.RestController; @@ -15,14 +14,9 @@ import java.net.ServerSocket; import java.net.Socket; import java.text.SimpleDateFormat; -import java.time.Instant; -import java.time.ZoneId; -import java.time.ZonedDateTime; import java.util.*; import java.util.concurrent.Executor; import java.util.concurrent.Executors; -import java.util.regex.Matcher; -import java.util.regex.Pattern; @RestController @Slf4j diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 5014de8..2a83095 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -101,8 +101,8 @@ timeout=60000: -accessKeyId: LTAI4G5zjJRkun2eRdzU8GhR -accessKeySecret: 6EIRr9uZeRobvHBRqskyGwjTLKpHYv +accessKeyId: LTAI5tPfc1VJzz7VuhzcBwug +accessKeySecret: gG1srKxPFDBNWe2oHfqmK1qsSQkf1e signName: 鏉窞鍒╂箹绉戞妧 #鏅鸿兘鍛煎彨(涓婃捣) @@ -132,3 +132,6 @@ #璇锋眰IP鍜岀鍙e彿 req_path: 192.168.2.10:8099 + +#浜岀淮鐮佽矾寰� +qrpath: D:\qrcode diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaScript.java b/smartor/src/main/java/com/smartor/domain/IvrLibaScript.java index 80d4345..d35b512 100644 --- a/smartor/src/main/java/com/smartor/domain/IvrLibaScript.java +++ b/smartor/src/main/java/com/smartor/domain/IvrLibaScript.java @@ -127,6 +127,13 @@ private String targettype; /** + * 鎸囨爣鎻忚堪 + */ + @Excel(name = "鎸囨爣鎻忚堪") + @ApiModelProperty(value = "鎸囨爣鎻忚堪") + private String targetdesc; + + /** * 鎸囨爣鍚嶇О */ @ApiModelProperty("鎸囨爣鍚嶇О") diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaScriptVO.java b/smartor/src/main/java/com/smartor/domain/IvrLibaScriptVO.java index 60cc264..f2a3906 100644 --- a/smartor/src/main/java/com/smartor/domain/IvrLibaScriptVO.java +++ b/smartor/src/main/java/com/smartor/domain/IvrLibaScriptVO.java @@ -142,6 +142,13 @@ private String targettype; /** + * 鎸囨爣鎻忚堪 + */ + @Excel(name = "鎸囨爣鎻忚堪") + @ApiModelProperty(value = "鎸囨爣鎻忚堪") + private String targetdesc; + + /** * 鎸囨爣鍚嶇О */ @ApiModelProperty("鎸囨爣鍚嶇О") diff --git a/smartor/src/main/java/com/smartor/domain/SvyLibScript.java b/smartor/src/main/java/com/smartor/domain/SvyLibScript.java index 467a478..066878a 100644 --- a/smartor/src/main/java/com/smartor/domain/SvyLibScript.java +++ b/smartor/src/main/java/com/smartor/domain/SvyLibScript.java @@ -65,6 +65,12 @@ @Excel(name = " 棰樼洰 ") @ApiModelProperty("棰樼洰") private String script; + /** + * 棰樼洰 + */ + @Excel(name = " 棰樼洰鍥剧墖 ") + @ApiModelProperty("棰樼洰鍥剧墖") + private String scriptPicture; /** * 鎺掑簭 @@ -174,6 +180,21 @@ @ApiModelProperty(value = "鍥炲锛堟寚闂鐨勫洖澶嶏紝缁欓棶绛旈鐢ㄧ殑锛�") private String reply; + @ApiModelProperty(value = "鍒嗗�肩被鍨嬶細1锛氭暟瀛楋紝2锛氱瓑绾�") + private String scoretype; + + @ApiModelProperty(value = "棰樼洰鍒嗗�硷細鏁板瓧1,2绛夛紱瀛楁瘝A銆丅锛孋锛孌绛夛紱") + private String score; + + @ApiModelProperty(value = "閫傜敤鐤剧梾") + private String icd10Name; + + @ApiModelProperty(value = "闂涓婚") + private String topic; + + @ApiModelProperty(value = "閫傜敤鐤剧梾锛堟暟缁勶級") + private List<String> icd10NameList; + /** * pageNum */ diff --git a/smartor/src/main/java/com/smartor/domain/SvyLibTemplate.java b/smartor/src/main/java/com/smartor/domain/SvyLibTemplate.java index 6a90b67..35600e0 100644 --- a/smartor/src/main/java/com/smartor/domain/SvyLibTemplate.java +++ b/smartor/src/main/java/com/smartor/domain/SvyLibTemplate.java @@ -157,7 +157,7 @@ * 闂嵎棰樼洰闆嗗悎 */ @ApiModelProperty(value = "闂嵎棰樼洰闆嗗悎") - private List<SvyLibScript> svyLibTopics; + private List<SvyLibTemplateScript> svyLibScripts; /** * 妯℃澘绉戝鍏宠仈闆嗗悎 @@ -206,6 +206,12 @@ private String otherdata = ""; /** + * 闂鎬诲垎鍊� + */ + @ApiModelProperty("闂鎬诲垎鍊�") + private String scriptScore; + + /** * 鍊肩被鍨嬶紙1 閫夐」 2 鏂囨湰 3 鏁板�硷級 */ @ApiModelProperty(value = "鍊肩被鍨嬶紙1 閫夐」 2 鏂囨湰 3 鏁板�硷級") @@ -216,6 +222,9 @@ @ApiModelProperty(value = "鍥炲锛堟寚闂鐨勫洖澶嶏紝缁欓棶绛旈鐢ㄧ殑锛�") private String reply; + @ApiModelProperty(value = "鍒嗘暟绫诲瀷锛堟暟瀛楋紝瀛楁瘝锛岀瓑绾э級") + private String scoreType; + public SvyLibTemplate() { } diff --git a/smartor/src/main/java/com/smartor/domain/SvyLibTemplateScript.java b/smartor/src/main/java/com/smartor/domain/SvyLibTemplateScript.java new file mode 100644 index 0000000..3d20348 --- /dev/null +++ b/smartor/src/main/java/com/smartor/domain/SvyLibTemplateScript.java @@ -0,0 +1,233 @@ +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; + +/** + * 妯℃澘闂嵎棰樼洰瀵硅薄 svy_lib_template_script + * + * @author ruoyi + * @date 2024-06-18 + */ +@Data +@ApiModel(value = "SvyLibTemplateScript", description = "妯℃澘闂嵎棰樼洰瀵硅薄") +public class SvyLibTemplateScript extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 鑷ID + */ + @ApiModelProperty("鑷ID") + private Long id; + + /** + * 鑰佺増鏈琁D + */ + @Excel(name = " 鑰佺増鏈琁D ") + @ApiModelProperty("鑰佺増鏈琁D") + private Long oldid; + + /** + * 闂嵎ID + */ + @Excel(name = " 闂嵎ID ") + @ApiModelProperty("闂嵎ID") + private Long svyid; + + /** + * 棰樼洰绫诲瀷;鏋氫妇 1.鍗曢�� 2澶氶�� 3濉┖ 4鍏跺畠 + */ + @Excel(name = " 棰樼洰绫诲瀷;鏋氫妇 1.鍗曢�� 2澶氶�� 3濉┖ 4鍏跺畠") + @ApiModelProperty("棰樼洰绫诲瀷;鏋氫妇 1.鍗曢�� 2澶氶�� 3濉┖ 4鍏跺畠") + private String scriptType; + + /** + * 棰樼洰Code + */ + @Excel(name = " 棰樼洰Code ") + @ApiModelProperty("棰樼洰Code") + private String scriptCode; + + /** + * 鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎 + */ + @ApiModelProperty(value = "鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎") + private Integer isoperation; + + /** + * 棰樼洰 + */ + @Excel(name = " 棰樼洰 ") + @ApiModelProperty("棰樼洰") + private String script; + + /** + * 棰樼洰鏍囩 + */ + @Excel(name = "棰樼洰鏍囩") + @ApiModelProperty("棰樼洰鏍囩") + private String tag; + + /** + * 鎺掑簭 + */ + @Excel(name = " 鎺掑簭 ") + @ApiModelProperty("鎺掑簭") + private Long sort; + + /** + * 鏄惁蹇呭~ 0蹇呭~ 1涓嶅繀濉� + */ + @Excel(name = " 鏄惁蹇呭~ 0蹇呭~ 1涓嶅繀濉�") + @ApiModelProperty("鏄惁蹇呭~ 0蹇呭~ 1涓嶅繀濉�") + private String ismandatory; + + /** + * 鏄惁闅愯棌 + */ + @Excel(name = " 鏄惁闅愯棌 ") + @ApiModelProperty("鏄惁闅愯棌") + private Long ishide; + + /** + * 鍒犻櫎鏍囪 + */ + @ApiModelProperty("鍒犻櫎鏍囪") + private String delFlag; + + /** + * 鏈烘瀯ID + */ + @Excel(name = " 鏈烘瀯ID ") + @ApiModelProperty("鏈烘瀯ID") + private String orgid; + + /** + * 涓婁紶鏍囪 + */ + @Excel(name = " 涓婁紶鏍囪 ") + @ApiModelProperty("涓婁紶鏍囪") + private Long isupload; + + /** + * 涓婁紶鏃堕棿 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty("涓婁紶鏃堕棿") + private Date uploadTime; + + /** + * 搴熷純 + */ + @ApiModelProperty("锛堝簾寮冿級") + private Long svyTopicid; + + /** + * 鐖禝D + */ + @Excel(name = "鐖禝D") + @ApiModelProperty("鐖禝D") + private Long pid; + + /** + * GUID + */ + @Excel(name = "GUID") + @ApiModelProperty("GUID") + private String guid; + + /** + * 鍒嗙被id + */ + @Excel(name = "鍒嗙被id") + @ApiModelProperty("鍒嗙被id") + private Long categoryid; + + /** + * 棰樼洰鍐呭 + */ + @Excel(name = "棰樼洰鍐呭") + @ApiModelProperty("棰樼洰鎻忚堪") + private String scriptContent; + + /** + * 棰樼洰鍥剧墖 + */ + @Excel(name = "棰樼洰鍥剧墖") + @ApiModelProperty("棰樼洰鍥剧墖") + private String scriptPicture; + + /** + * 閫傜敤鏂瑰紡锛氳皟鏌ヨ〃1锛屾櫤鑳借闊�2銆佷汉宸�3 + */ + @Excel(name = "閫傜敤鏂瑰紡锛氳皟鏌ヨ〃1锛屾櫤鑳借闊�2銆佷汉宸�3") + @ApiModelProperty("閫傜敤鏂瑰紡锛氳皟鏌ヨ〃1锛屾櫤鑳借闊�2銆佷汉宸�3") + private String suitway; + + /** + * 鏄惁鍙敤 0鍙敤 1涓嶅彲鐢� + */ + @Excel(name = "鏄惁鍙敤 0鍙敤 1涓嶅彲鐢�") + @ApiModelProperty("鏄惁鍙敤 0鍙敤 1涓嶅彲鐢�") + private String isavailable; + + /** + * 璇█ + */ + @Excel(name = "璇█") + @ApiModelProperty("璇█") + private String language; + + /** + * 鍏跺畠鏁版嵁锛堝瓨鍌ㄥ彉閲忥級 + */ + @Excel(name = "鍏跺畠鏁版嵁", readConverterExp = "瀛�=鍌ㄥ彉閲�") + @ApiModelProperty("鍏跺畠鏁版嵁锛堝瓨鍌ㄥ彉閲忥級") + private String otherdata; + + /** + * 鍊肩被鍨嬶紙1 閫夐」 2 鏂囨湰 3 鏁板�硷級 + */ + @Excel(name = "鍊肩被鍨�", readConverterExp = "1=,閫�=椤�,2=,鏂�=鏈�,3=,鏁�=鍊�") + @ApiModelProperty("鍊肩被鍨嬶紙1 閫夐」 2 鏂囨湰 3 鏁板�硷級") + private String valueType; + + /** + * 鍥炲锛堟寚闂鐨勫洖澶嶏紝缁欓棶绛旈鐢ㄧ殑锛� + */ + @Excel(name = "鍥炲", readConverterExp = "鎸�=闂鐨勫洖澶嶏紝缁欓棶绛旈鐢ㄧ殑") + @ApiModelProperty("鍥炲锛堟寚闂鐨勫洖澶嶏紝缁欓棶绛旈鐢ㄧ殑锛�") + private String reply; + + /** + * 鍒嗗�肩被鍨嬶細1锛氭暟瀛楋紝2锛氱瓑绾� + */ + @Excel(name = "鍒嗗�肩被鍨嬶細1锛氭暟瀛楋紝2锛氱瓑绾�") + @ApiModelProperty("鍒嗗�肩被鍨嬶細1锛氭暟瀛楋紝2锛氱瓑绾�") + private String scoretype; + + /** + * 妯℃澘闂閫夐」闆嗗悎 + */ + @Excel(name = "妯℃澘闂閫夐」闆嗗悎") + @ApiModelProperty("妯℃澘闂閫夐」闆嗗悎") + private List<SvyLibTemplateTargetoption> svyLibTemplateTargetoptions; + + /** + * 棰樼洰鍒嗗�硷細鏁板瓧1,2绛夛紱瀛楁瘝A銆丅锛孋锛孌绛夛紱 + */ + @Excel(name = "棰樼洰鍒嗗�硷細鏁板瓧1,2绛夛紱瀛楁瘝A銆丅锛孋锛孌绛夛紱") + @ApiModelProperty("棰樼洰鍒嗗�硷細鏁板瓧1,2绛夛紱瀛楁瘝A銆丅锛孋锛孌绛夛紱") + private String score; + +} diff --git a/smartor/src/main/java/com/smartor/domain/SvyLibTemplateTargetoption.java b/smartor/src/main/java/com/smartor/domain/SvyLibTemplateTargetoption.java new file mode 100644 index 0000000..bfc0933 --- /dev/null +++ b/smartor/src/main/java/com/smartor/domain/SvyLibTemplateTargetoption.java @@ -0,0 +1,239 @@ +package com.smartor.domain; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +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; + +/** + * 闂嵎闂鎸囨爣閫夐」搴撳璞� svy_liba_template_targetoption + * + * @author ruoyi + * @date 2024-06-18 + */ +@Data +@ApiModel(value = "SvyLibTemplateTargetoption", description = "闂嵎闂鎸囨爣閫夐」搴撳璞�") +public class SvyLibTemplateTargetoption extends BaseEntity { + private static final long serialVersionUID = 1L; + /** + * 涓婚敭 + */ + @ApiModelProperty(value = "涓婚敭") + private Long id; + + /** + * 妯℃澘鎸囨爣ID + */ + @Excel(name = "妯℃澘鎸囨爣ID") + @ApiModelProperty(value = "妯℃澘鎸囨爣ID") + private Long targetid; + + /** + * 鎸囨爣鍚嶇О + */ + @Excel(name = "鎸囨爣鍚嶇О") + @ApiModelProperty(value = "鎸囨爣鍚嶇О") + private String targetname; + + /** + * 妯℃澘ID + */ + @Excel(name = "妯℃澘ID") + @ApiModelProperty(value = "妯℃澘ID") + private Long templateID; + + /** + * 璇濇湳ID + */ + @Excel(name = "璇濇湳ID") + @ApiModelProperty(value = "璇濇湳ID") + private Long scriptid; + + /** + * 璇濇湳ID + */ + @Excel(name = "棰勮闃�鍊间笂闄�") + @ApiModelProperty(value = "棰勮闃�鍊间笂闄�") + private Long warnup; + + /** + * 璇濇湳ID + */ + @Excel(name = "棰勮闃�鍊间笅闄�") + @ApiModelProperty(value = "棰勮闃�鍊间笅闄�") + private Long warndown; + + /** + * 妯℃澘鎸囨爣绫诲瀷 + */ + @Excel(name = "妯℃澘鎸囨爣绫诲瀷") + @ApiModelProperty(value = "妯℃澘鎸囨爣绫诲瀷") + private String targettype; + + /** + * 绫诲埆鍚嶇О + */ + @Excel(name = "绫诲埆鍚嶇О") + @ApiModelProperty(value = "绫诲埆鍚嶇О") + private String categoryName = null; + + /** + * 妯℃澘鎸囨爣鍊� + */ + @Excel(name = "妯℃澘鎸囨爣鍊�") + @ApiModelProperty(value = "妯℃澘鎸囨爣鍊�") + private String targetvalue; + + /** + * 妯℃澘鎸囨爣姝e垯 + */ + @Excel(name = "妯℃澘鎸囨爣姝e垯") + @ApiModelProperty(value = "妯℃澘鎸囨爣姝e垯") + private String targetregex; + + /** + * 妯℃澘鎸囨爣姝e垯 + */ + @Excel(name = "妯℃澘鎸囨爣姝e垯2") + @ApiModelProperty(value = "妯℃澘鎸囨爣姝e垯2") + private String targetregex2; + + @Excel(name = "姝e垯鍏抽敭瀛楅泦鍚�(鍚�)") + private String nodynamiccruxsJson; + + @Excel(name = "姝e垯鍏抽敭瀛楅泦鍚�(涓嶅惈)") + private String dynamiccruxsJson; + + @ApiModelProperty(value = "姝e垯鍏抽敭瀛�(鍚�)") + @Excel(name = "姝e垯鍏抽敭瀛�(鍚�)") + private List<String> nodynamiccruxs = new ArrayList<>(); + + @ApiModelProperty(value = "姝e垯鍏抽敭瀛�(涓嶅惈)") + @Excel(name = "姝e垯鍏抽敭瀛�(涓嶅惈)") + private List<String> dynamiccruxs = new ArrayList<>(); + + /** + * 閫夐」鎻忚堪 + */ + @Excel(name = "閫夐」鎻忚堪") + @ApiModelProperty(value = "閫夐」鎻忚堪") + private String optiondesc; + + /** + * 璇█ + */ + @Excel(name = "璇█") + @ApiModelProperty(value = "璇█") + private String language; + + /** + * 鐗堟湰 + */ + @Excel(name = "鐗堟湰") + @ApiModelProperty(value = "鐗堟湰") + private String version; + + /** + * 鍒嗙粍ID + */ + @Excel(name = "鍒嗙粍ID") + @ApiModelProperty(value = "鍒嗙粍ID") + private String groupid; + + /** + * 鏄惁寮傚父鏍囪瘑 + */ + @Excel(name = "鏄惁寮傚父鏍囪瘑") + @ApiModelProperty(value = "鏄惁寮傚父鏍囪瘑") + private Long isabnormal; + +// /** +// * 棰勮闃�鍊间笂闄� +// */ +// @Excel(name = "棰勮闃�鍊间笂闄�") +// @ApiModelProperty(value = "棰勮闃�鍊间笂闄�") +// private Long warnup; +// +// /** +// * 棰勮闃�鍊间笅闄� +// */ +// @Excel(name = "棰勮闃�鍊间笅闄�") +// @ApiModelProperty(value = "棰勮闃�鍊间笅闄�") +// private Long warndown; + + /** + * 鍒犻櫎鏍囪 + */ + @ApiModelProperty(value = "鍒犻櫎鏍囪") + private String delFlag; + + /** + * 涓婁紶鏍囪 + */ + @Excel(name = " 涓婁紶鏍囪 ") + @ApiModelProperty(value = "涓婁紶鏍囪") + private Long isupload; + + /** + * 涓婁紶鏃堕棿 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty(value = "涓婁紶鏃堕棿") + private Date uploadTime; + + /** + * 鏈烘瀯ID + */ + @Excel(name = " 鏈烘瀯ID ") + @ApiModelProperty(value = "鏈烘瀯ID") + private String orgid; + + /** + * 鐖禝D + */ + @Excel(name = "鐖禝D") + @ApiModelProperty(value = "鐖禝D") + private Long pid; + + /** + * GUID + */ + @Excel(name = "GUID") + @ApiModelProperty(value = "GUID") + private String guid; + + /** + * 鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎 + */ + @ApiModelProperty(value = "鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎") + private Integer isoperation; + + /** + * 鏄惁鏄敤鎴烽�夋嫨鐨勯�夐」 + */ + @ApiModelProperty(value = "鏄惁鏄敤鎴烽�夋嫨鐨勯�夐」") + private Boolean isUserOperation = false; + + + /** + * 涓嬩竴棰� + */ + @ApiModelProperty(value = "涓嬩竴棰�") + private Integer nextQuestion; + + /** + * 閫夐」鍥剧墖璺緞 + */ + @ApiModelProperty(value = "閫夐」鍥剧墖璺緞") + private String picturePath; + +} diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskScript.java b/smartor/src/main/java/com/smartor/domain/SvyTaskScript.java index 76ec335..f817668 100644 --- a/smartor/src/main/java/com/smartor/domain/SvyTaskScript.java +++ b/smartor/src/main/java/com/smartor/domain/SvyTaskScript.java @@ -176,8 +176,8 @@ /** * 棰樼洰鍥剧墖璺緞 */ - @Excel(name = "棰樼洰鍥剧墖璺緞") - @ApiModelProperty(value = "棰樼洰鍥剧墖璺緞") - private String picturePath; + @Excel(name = "棰樼洰鍥剧墖") + @ApiModelProperty(value = "棰樼洰鍥剧墖") + private String scriptPicture; } diff --git a/smartor/src/main/java/com/smartor/mapper/SvyLibTemplateScriptMapper.java b/smartor/src/main/java/com/smartor/mapper/SvyLibTemplateScriptMapper.java new file mode 100644 index 0000000..461dc15 --- /dev/null +++ b/smartor/src/main/java/com/smartor/mapper/SvyLibTemplateScriptMapper.java @@ -0,0 +1,63 @@ +package com.smartor.mapper; + +import com.smartor.domain.SvyLibTemplateScript; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 妯℃澘闂嵎棰樼洰Mapper鎺ュ彛 + * + * @author ls + * @date 2024-06-18 + */ +@Mapper +public interface SvyLibTemplateScriptMapper { + /** + * 鏌ヨ妯℃澘闂嵎棰樼洰 + * + * @param topicid 妯℃澘闂嵎棰樼洰涓婚敭 + * @return 妯℃澘闂嵎棰樼洰 + */ + public SvyLibTemplateScript selectSvyLibTemplateScriptByTopicid(Long topicid); + + /** + * 鏌ヨ妯℃澘闂嵎棰樼洰鍒楄〃 + * + * @param svyLibTemplateScript 妯℃澘闂嵎棰樼洰 + * @return 妯℃澘闂嵎棰樼洰闆嗗悎 + */ + public List<SvyLibTemplateScript> selectSvyLibTemplateScriptList(SvyLibTemplateScript svyLibTemplateScript); + + /** + * 鏂板妯℃澘闂嵎棰樼洰 + * + * @param svyLibTemplateScript 妯℃澘闂嵎棰樼洰 + * @return 缁撴灉 + */ + public int insertSvyLibTemplateScript(SvyLibTemplateScript svyLibTemplateScript); + + /** + * 淇敼妯℃澘闂嵎棰樼洰 + * + * @param svyLibTemplateScript 妯℃澘闂嵎棰樼洰 + * @return 缁撴灉 + */ + public int updateSvyLibTemplateScript(SvyLibTemplateScript svyLibTemplateScript); + + /** + * 鍒犻櫎妯℃澘闂嵎棰樼洰 + * + * @param topicid 妯℃澘闂嵎棰樼洰涓婚敭 + * @return 缁撴灉 + */ + public int deleteSvyLibTemplateScriptByTopicid(Long topicid); + + /** + * 鎵归噺鍒犻櫎妯℃澘闂嵎棰樼洰 + * + * @param topicids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎 + * @return 缁撴灉 + */ + public int deleteSvyLibTemplateScriptByTopicids(Long[] topicids); +} diff --git a/smartor/src/main/java/com/smartor/mapper/SvyLibTemplateTargetoptionMapper.java b/smartor/src/main/java/com/smartor/mapper/SvyLibTemplateTargetoptionMapper.java new file mode 100644 index 0000000..375870f --- /dev/null +++ b/smartor/src/main/java/com/smartor/mapper/SvyLibTemplateTargetoptionMapper.java @@ -0,0 +1,63 @@ +package com.smartor.mapper; + +import com.smartor.domain.SvyLibTemplateTargetoption; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 闂嵎闂鎸囨爣閫夐」搴揗apper鎺ュ彛 + * + * @author ruoyi + * @date 2024-06-18 + */ +@Mapper +public interface SvyLibTemplateTargetoptionMapper { + /** + * 鏌ヨ闂嵎闂鎸囨爣閫夐」搴� + * + * @param id 闂嵎闂鎸囨爣閫夐」搴撲富閿� + * @return 闂嵎闂鎸囨爣閫夐」搴� + */ + public SvyLibTemplateTargetoption selectSvyLibTemplateTargetoptionById(Long id); + + /** + * 鏌ヨ闂嵎闂鎸囨爣閫夐」搴撳垪琛� + * + * @param svyLibTemplateTargetoption 闂嵎闂鎸囨爣閫夐」搴� + * @return 闂嵎闂鎸囨爣閫夐」搴撻泦鍚� + */ + public List<SvyLibTemplateTargetoption> selectSvyLibTemplateTargetoptionList(SvyLibTemplateTargetoption svyLibTemplateTargetoption); + + /** + * 鏂板闂嵎闂鎸囨爣閫夐」搴� + * + * @param svyLibTemplateTargetoption 闂嵎闂鎸囨爣閫夐」搴� + * @return 缁撴灉 + */ + public int insertSvyLibTemplateTargetoption(SvyLibTemplateTargetoption svyLibTemplateTargetoption); + + /** + * 淇敼闂嵎闂鎸囨爣閫夐」搴� + * + * @param svyLibTemplateTargetoption 闂嵎闂鎸囨爣閫夐」搴� + * @return 缁撴灉 + */ + public int updateSvyLibTemplateTargetoption(SvyLibTemplateTargetoption svyLibTemplateTargetoption); + + /** + * 鍒犻櫎闂嵎闂鎸囨爣閫夐」搴� + * + * @param id 闂嵎闂鎸囨爣閫夐」搴撲富閿� + * @return 缁撴灉 + */ + public int deleteSvyLibTemplateTargetoptionById(Long id); + + /** + * 鎵归噺鍒犻櫎闂嵎闂鎸囨爣閫夐」搴� + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎 + * @return 缁撴灉 + */ + public int deleteSvyLibTemplateTargetoptionByIds(Long[] ids); +} diff --git a/smartor/src/main/java/com/smartor/service/ISvyLibTemplateScriptService.java b/smartor/src/main/java/com/smartor/service/ISvyLibTemplateScriptService.java new file mode 100644 index 0000000..5fa8498 --- /dev/null +++ b/smartor/src/main/java/com/smartor/service/ISvyLibTemplateScriptService.java @@ -0,0 +1,62 @@ +package com.smartor.service; + +import com.smartor.domain.SvyLibTemplateScript; + +import java.util.List; + +/** + * 妯℃澘闂嵎棰樼洰Service鎺ュ彛 + * + * @author ruoyi + * @date 2024-06-18 + */ +public interface ISvyLibTemplateScriptService +{ + /** + * 鏌ヨ妯℃澘闂嵎棰樼洰 + * + * @param topicid 妯℃澘闂嵎棰樼洰涓婚敭 + * @return 妯℃澘闂嵎棰樼洰 + */ + public SvyLibTemplateScript selectSvyLibTemplateScriptByTopicid(Long topicid); + + /** + * 鏌ヨ妯℃澘闂嵎棰樼洰鍒楄〃 + * + * @param svyLibTemplateScript 妯℃澘闂嵎棰樼洰 + * @return 妯℃澘闂嵎棰樼洰闆嗗悎 + */ + public List<SvyLibTemplateScript> selectSvyLibTemplateScriptList(SvyLibTemplateScript svyLibTemplateScript); + + /** + * 鏂板妯℃澘闂嵎棰樼洰 + * + * @param svyLibTemplateScript 妯℃澘闂嵎棰樼洰 + * @return 缁撴灉 + */ + public int insertSvyLibTemplateScript(SvyLibTemplateScript svyLibTemplateScript); + + /** + * 淇敼妯℃澘闂嵎棰樼洰 + * + * @param svyLibTemplateScript 妯℃澘闂嵎棰樼洰 + * @return 缁撴灉 + */ + public int updateSvyLibTemplateScript(SvyLibTemplateScript svyLibTemplateScript); + + /** + * 鎵归噺鍒犻櫎妯℃澘闂嵎棰樼洰 + * + * @param topicids 闇�瑕佸垹闄ょ殑妯℃澘闂嵎棰樼洰涓婚敭闆嗗悎 + * @return 缁撴灉 + */ + public int deleteSvyLibTemplateScriptByTopicids(Long[] topicids); + + /** + * 鍒犻櫎妯℃澘闂嵎棰樼洰淇℃伅 + * + * @param topicid 妯℃澘闂嵎棰樼洰涓婚敭 + * @return 缁撴灉 + */ + public int deleteSvyLibTemplateScriptByTopicid(Long topicid); +} diff --git a/smartor/src/main/java/com/smartor/service/ISvyLibTemplateService.java b/smartor/src/main/java/com/smartor/service/ISvyLibTemplateService.java index 29c964b..dbda5a1 100644 --- a/smartor/src/main/java/com/smartor/service/ISvyLibTemplateService.java +++ b/smartor/src/main/java/com/smartor/service/ISvyLibTemplateService.java @@ -30,13 +30,13 @@ */ public List<SvyLibTemplate> selectSvyLibTemplateList(SvyLibTemplateReq svyLibTemplateReq); - /** - * 鏂板闂嵎 - * - * @param svyLibTemplate 闂嵎 - * @return 缁撴灉 - */ - public int insertSvyLibTemplate(SvyLibTemplate svyLibTemplate); +// /** +// * 鏂板闂嵎 +// * +// * @param svyLibTemplate 闂嵎 +// * @return 缁撴灉 +// */ +// public int insertSvyLibTemplate(SvyLibTemplate svyLibTemplate); /** * 鏂板鎴栦慨鏀归棶鍗锋ā鏉夸俊鎭� diff --git a/smartor/src/main/java/com/smartor/service/ISvyLibTemplateTargetoptionService.java b/smartor/src/main/java/com/smartor/service/ISvyLibTemplateTargetoptionService.java new file mode 100644 index 0000000..d78c573 --- /dev/null +++ b/smartor/src/main/java/com/smartor/service/ISvyLibTemplateTargetoptionService.java @@ -0,0 +1,61 @@ +package com.smartor.service; + +import com.smartor.domain.SvyLibTemplateTargetoption; + +import java.util.List; + +/** + * 闂嵎闂鎸囨爣閫夐」搴揝ervice鎺ュ彛 + * + * @author ruoyi + * @date 2024-06-18 + */ +public interface ISvyLibTemplateTargetoptionService { + /** + * 鏌ヨ闂嵎闂鎸囨爣閫夐」搴� + * + * @param id 闂嵎闂鎸囨爣閫夐」搴撲富閿� + * @return 闂嵎闂鎸囨爣閫夐」搴� + */ + public SvyLibTemplateTargetoption selectSvyLibTemplateTargetoptionById(Long id); + + /** + * 鏌ヨ闂嵎闂鎸囨爣閫夐」搴撳垪琛� + * + * @param svyLibTemplateTargetoption 闂嵎闂鎸囨爣閫夐」搴� + * @return 闂嵎闂鎸囨爣閫夐」搴撻泦鍚� + */ + public List<SvyLibTemplateTargetoption> selectSvyLibTemplateTargetoptionList(SvyLibTemplateTargetoption svyLibTemplateTargetoption); + + /** + * 鏂板闂嵎闂鎸囨爣閫夐」搴� + * + * @param svyLibTemplateTargetoption 闂嵎闂鎸囨爣閫夐」搴� + * @return 缁撴灉 + */ + public int insertSvyLibTemplateTargetoption(SvyLibTemplateTargetoption svyLibTemplateTargetoption); + + /** + * 淇敼闂嵎闂鎸囨爣閫夐」搴� + * + * @param svyLibTemplateTargetoption 闂嵎闂鎸囨爣閫夐」搴� + * @return 缁撴灉 + */ + public int updateSvyLibTemplateTargetoption(SvyLibTemplateTargetoption svyLibTemplateTargetoption); + + /** + * 鎵归噺鍒犻櫎闂嵎闂鎸囨爣閫夐」搴� + * + * @param ids 闇�瑕佸垹闄ょ殑闂嵎闂鎸囨爣閫夐」搴撲富閿泦鍚� + * @return 缁撴灉 + */ + public int deleteSvyLibTemplateTargetoptionByIds(Long[] ids); + + /** + * 鍒犻櫎闂嵎闂鎸囨爣閫夐」搴撲俊鎭� + * + * @param id 闂嵎闂鎸囨爣閫夐」搴撲富閿� + * @return 缁撴灉 + */ + public int deleteSvyLibTemplateTargetoptionById(Long id); +} diff --git a/smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java index 421f2c7..e31e958 100644 --- a/smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java +++ b/smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java @@ -1,6 +1,7 @@ package com.smartor.service.impl; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; @@ -19,9 +20,13 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.lang.reflect.Array; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.stream.Collectors; /** * 鎸囨爣閫夐」搴揝ervice涓氬姟灞傚鐞� @@ -68,6 +73,8 @@ List<IvrLibaTarget> ivrLibaTargets = ivrLibaTargetMapper.selectIvrLibaTargetList(ivrLibaTarget); List<IvrLibaTargetVO> ivrLibaTargetVOS = DtoConversionUtils.sourceToTarget(ivrLibaTargets, IvrLibaTargetVO.class); for (IvrLibaTargetVO ivrLibaTarget1 : ivrLibaTargetVOS) { + ivrLibaTarget1.setSuitWayList(JSONArray.parseArray(ivrLibaTarget1.getSuitWay(), String.class)); + IvrLibaTargetoption ivrLibaTargetoption = new IvrLibaTargetoption(); ivrLibaTargetoption.setTargetid(ivrLibaTarget1.getId()); //鑾峰彇璇ユ寚鏍囩殑閫夐」 @@ -141,7 +148,7 @@ @Transactional(rollbackFor = Exception.class) public int saveOrupdateIvrLibaTarget(IvrLibaTargetVO ivrLibaTargetVO) { IvrLibaTarget ivrLibaTarget = DtoConversionUtils.sourceToTarget(ivrLibaTargetVO, IvrLibaTarget.class); - if (ObjectUtils.isEmpty(ivrLibaTargetVO.getSuitWayList())) + if (ObjectUtils.isNotEmpty(ivrLibaTargetVO.getSuitWayList())) ivrLibaTarget.setSuitWay(JSON.toJSONString(ivrLibaTargetVO.getSuitWayList())); ivrLibaTarget.setUpdateTime(DateUtils.getNowDate()); if (ivrLibaTargetVO.getIsoperation() != null && ivrLibaTargetVO.getIsoperation() == 1) { diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyLibScriptServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyLibScriptServiceImpl.java index 5066add..0a19606 100644 --- a/smartor/src/main/java/com/smartor/service/impl/SvyLibScriptServiceImpl.java +++ b/smartor/src/main/java/com/smartor/service/impl/SvyLibScriptServiceImpl.java @@ -1,5 +1,7 @@ package com.smartor.service.impl; +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson.JSONArray; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.StringUtils; import com.smartor.domain.SvyLibScript; @@ -13,6 +15,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.Arrays; import java.util.Date; import java.util.List; @@ -57,6 +60,9 @@ for (int j = 0; j < svyLibTopics.size(); j++) { log.info("闂id涓猴細{}", svyLibTopics.get(j).getSvyscriptId()); + if (StringUtils.isNotEmpty(svyLibTopics.get(j).getIcd10Name())) + svyLibTopics.get(j).setIcd10NameList(JSONArray.parseArray(svyLibTopics.get(j).getIcd10Name(), String.class)); + if (StringUtils.isNotEmpty(svyLibTopics.get(j).getScripttype()) && svyLibTopics.get(j).getScripttype().equals("3") || svyLibTopics.get(j).getId() == null) { //浣滅瓟棰橈紝涓嶉渶瑕侀�夐」 continue; @@ -87,6 +93,10 @@ @Override public Integer saveOrUpdateScript(SvyLibScript svyLibTopic) { Integer i = null; + if (CollectionUtils.isNotEmpty(svyLibTopic.getIcd10NameList()) && svyLibTopic.getIcd10NameList().size() > 0) { + //灏嗘暟缁勮浆鎴愬瓧绗︿覆 + svyLibTopic.setIcd10Name(JSON.toJSONString(svyLibTopic.getIcd10NameList())); + } //瀵归鐩繘琛屽鐞� if (svyLibTopic.getIsoperation() != null && svyLibTopic.getIsoperation() == 1) { diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateScriptServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateScriptServiceImpl.java new file mode 100644 index 0000000..ff066d2 --- /dev/null +++ b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateScriptServiceImpl.java @@ -0,0 +1,97 @@ +package com.smartor.service.impl; + +import com.ruoyi.common.utils.DateUtils; +import com.smartor.domain.SvyLibTemplateScript; +import com.smartor.mapper.SvyLibTemplateScriptMapper; +import com.smartor.service.ISvyLibTemplateScriptService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 妯℃澘闂嵎棰樼洰Service涓氬姟灞傚鐞� + * + * @author ruoyi + * @date 2024-06-18 + */ +@Service +public class SvyLibTemplateScriptServiceImpl implements ISvyLibTemplateScriptService +{ + @Autowired + private SvyLibTemplateScriptMapper svyLibTemplateScriptMapper; + + /** + * 鏌ヨ妯℃澘闂嵎棰樼洰 + * + * @param topicid 妯℃澘闂嵎棰樼洰涓婚敭 + * @return 妯℃澘闂嵎棰樼洰 + */ + @Override + public SvyLibTemplateScript selectSvyLibTemplateScriptByTopicid(Long topicid) + { + return svyLibTemplateScriptMapper.selectSvyLibTemplateScriptByTopicid(topicid); + } + + /** + * 鏌ヨ妯℃澘闂嵎棰樼洰鍒楄〃 + * + * @param svyLibTemplateScript 妯℃澘闂嵎棰樼洰 + * @return 妯℃澘闂嵎棰樼洰 + */ + @Override + public List<SvyLibTemplateScript> selectSvyLibTemplateScriptList(SvyLibTemplateScript svyLibTemplateScript) + { + return svyLibTemplateScriptMapper.selectSvyLibTemplateScriptList(svyLibTemplateScript); + } + + /** + * 鏂板妯℃澘闂嵎棰樼洰 + * + * @param svyLibTemplateScript 妯℃澘闂嵎棰樼洰 + * @return 缁撴灉 + */ + @Override + public int insertSvyLibTemplateScript(SvyLibTemplateScript svyLibTemplateScript) + { + svyLibTemplateScript.setCreateTime(DateUtils.getNowDate()); + return svyLibTemplateScriptMapper.insertSvyLibTemplateScript(svyLibTemplateScript); + } + + /** + * 淇敼妯℃澘闂嵎棰樼洰 + * + * @param svyLibTemplateScript 妯℃澘闂嵎棰樼洰 + * @return 缁撴灉 + */ + @Override + public int updateSvyLibTemplateScript(SvyLibTemplateScript svyLibTemplateScript) + { + svyLibTemplateScript.setUpdateTime(DateUtils.getNowDate()); + return svyLibTemplateScriptMapper.updateSvyLibTemplateScript(svyLibTemplateScript); + } + + /** + * 鎵归噺鍒犻櫎妯℃澘闂嵎棰樼洰 + * + * @param topicids 闇�瑕佸垹闄ょ殑妯℃澘闂嵎棰樼洰涓婚敭 + * @return 缁撴灉 + */ + @Override + public int deleteSvyLibTemplateScriptByTopicids(Long[] topicids) + { + return svyLibTemplateScriptMapper.deleteSvyLibTemplateScriptByTopicids(topicids); + } + + /** + * 鍒犻櫎妯℃澘闂嵎棰樼洰淇℃伅 + * + * @param topicid 妯℃澘闂嵎棰樼洰涓婚敭 + * @return 缁撴灉 + */ + @Override + public int deleteSvyLibTemplateScriptByTopicid(Long topicid) + { + return svyLibTemplateScriptMapper.deleteSvyLibTemplateScriptByTopicid(topicid); + } +} diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java index 9f3abf0..c81b222 100644 --- a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java +++ b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java @@ -1,21 +1,21 @@ package com.smartor.service.impl; -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.DtoConversionUtils; import com.ruoyi.common.utils.StringUtils; import com.smartor.domain.*; import com.smartor.mapper.*; +import com.smartor.service.ISvyLibTemplateService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.smartor.service.ISvyLibTemplateService; -import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; /** * 闂嵎Service涓氬姟灞傚鐞� @@ -31,9 +31,9 @@ @Autowired private Icd10AssociationMapper icd10AssociationMapper; @Autowired - private SvyLibScriptMapper svyLibScriptMapper; + private SvyLibTemplateScriptMapper svyLibTemplateScriptMapper; @Autowired - private SvyLibScriptOptionMapper svyLibTopicoptionMapper; + private SvyLibTemplateTargetoptionMapper svyLibTemplateTargetoptionMapper; @Autowired private TempDetpRelevanceMapper tempDetpRelevanceMapper; @@ -59,26 +59,29 @@ List<SvyLibTemplate> svyLibTemplates = svyLibTemplateMapper.selectSvyLibTemplateList(svyLibTemplateReq); //娣诲姞棰樼洰 for (int i = 0; i < svyLibTemplates.size(); i++) { - SvyLibScript svyLibTopic = new SvyLibScript(); - svyLibTopic.setSvyid(svyLibTemplates.get(i).getSvyid()); - List<SvyLibScript> svyLibTopics = svyLibScriptMapper.selectSvyLibScriptList(svyLibTopic); +// SvyLibScript svyLibScript = new SvyLibScript(); +// svyLibScript.setSvyid(svyLibTemplates.get(i).getSvyid()); +// List<SvyLibScript> svyLibTopics = svyLibScriptMapper.selectSvyLibScriptList(svyLibScript); + SvyLibTemplateScript svyLibTemplateScript = new SvyLibTemplateScript(); + svyLibTemplateScript.setSvyid(svyLibTemplates.get(i).getSvyid()); + List<SvyLibTemplateScript> svyLibTemplateScripts = svyLibTemplateScriptMapper.selectSvyLibTemplateScriptList(svyLibTemplateScript); //鑾峰彇棰樼洰閫夐」 a: - for (int j = 0; j < svyLibTopics.size(); j++) { - log.info("闂id涓猴細{}", svyLibTopics.get(j).getSvyscriptId()); - if (StringUtils.isNotEmpty(svyLibTopics.get(j).getScripttype()) && svyLibTopics.get(j).getScripttype().equals("3") || svyLibTopics.get(j).getSvyscriptId() == null) { + for (int j = 0; j < svyLibTemplateScripts.size(); j++) { + log.info("闂id涓猴細{}", svyLibTemplateScripts.get(j).getId()); + if (StringUtils.isNotEmpty(svyLibTemplateScripts.get(j).getScriptType()) && svyLibTemplateScripts.get(j).getScriptType().equals("3") || svyLibTemplateScripts.get(j).getId() == null) { //浣滅瓟棰橈紝涓嶉渶瑕侀�夐」 continue a; } else { - SvyLibScriptOption svyLibTopicoption = new SvyLibScriptOption(); - svyLibTopicoption.setTopicid(svyLibTopics.get(j).getSvyscriptId()); - List<SvyLibScriptOption> svyLibTopicoptions = svyLibTopicoptionMapper.selectSvyLibScriptOptionList(svyLibTopicoption); + SvyLibTemplateTargetoption svyLibTopicoption = new SvyLibTemplateTargetoption(); + svyLibTopicoption.setScriptid(svyLibTemplateScripts.get(j).getId()); + List<SvyLibTemplateTargetoption> svyLibTemplateTargetoptions = svyLibTemplateTargetoptionMapper.selectSvyLibTemplateTargetoptionList(svyLibTopicoption); //灏嗘煡璇㈠嚭鐨勯�夐」鐩斁鍒伴鐩腑 - svyLibTopics.get(j).setSvyLibScriptOptions(svyLibTopicoptions); + svyLibTemplateScripts.get(j).setSvyLibTemplateTargetoptions(svyLibTemplateTargetoptions); } } //灏嗛鐩斁鍒伴棶鍗峰垪琛ㄤ腑 - svyLibTemplates.get(i).setSvyLibTopics(svyLibTopics); + svyLibTemplates.get(i).setSvyLibScripts(svyLibTemplateScripts); //鑾峰彇姣忎釜闂嵎瀵瑰簲鐨勭瀹� TempDetpRelevance tempDetpRelevance = new TempDetpRelevance(); @@ -105,33 +108,33 @@ return libTemplates; } - /** - * 鏂板闂嵎 - * - * @param svyLibTemplate 闂嵎 - * @return 缁撴灉 - */ - @Transactional - @Override - public int insertSvyLibTemplate(SvyLibTemplate svyLibTemplate) { - svyLibTemplate.setCreateTime(DateUtils.getNowDate()); - svyLibTemplateMapper.insertSvyLibTemplate(svyLibTemplate); - //鍏宠仈闂嵎鐤剧梾 - for (String icdId : svyLibTemplate.getIcdID()) { - Icd10Association icd10Association = new Icd10Association(); - icd10Association.setIcd10code(icdId); - icd10Association.setSvyid(svyLibTemplate.getSvyid()); - icd10AssociationMapper.insertIcd10Association(icd10Association); - } - //鏂板闂棰樼洰 - for (int i = 0; i < svyLibTemplate.getSvyLibTopics().size(); i++) { - SvyLibScript svyLibScript = svyLibTemplate.getSvyLibTopics().get(i); - svyLibScript.setSvyid(svyLibTemplate.getSvyid()); - //棰樼洰鐨勯�夐」鐩紝鐩存帴鐢╯vy_topicoption琛紝鐢╯vyTopicidf鍘诲叧鑱� - svyLibScriptMapper.insertSvyLibScript(svyLibScript); - } - return 1; - } +// /** +// * 鏂板闂嵎 +// * +// * @param svyLibTemplate 闂嵎 +// * @return 缁撴灉 +// */ +// @Transactional +// @Override +// public int insertSvyLibTemplate(SvyLibTemplate svyLibTemplate) { +// svyLibTemplate.setCreateTime(DateUtils.getNowDate()); +// svyLibTemplateMapper.insertSvyLibTemplate(svyLibTemplate); +// //鍏宠仈闂嵎鐤剧梾 +// for (String icdId : svyLibTemplate.getIcdID()) { +// Icd10Association icd10Association = new Icd10Association(); +// icd10Association.setIcd10code(icdId); +// icd10Association.setSvyid(svyLibTemplate.getSvyid()); +// icd10AssociationMapper.insertIcd10Association(icd10Association); +// } +// //鏂板闂棰樼洰 +// for (int i = 0; i < svyLibTemplate.getSvyLibScripts().size(); i++) { +// SvyLibScript svyLibScript = svyLibTemplate.getSvyLibScripts().get(i); +// svyLibScript.setSvyid(svyLibTemplate.getSvyid()); +// //棰樼洰鐨勯�夐」鐩紝鐩存帴鐢╯vy_topicoption琛紝鐢╯vyTopicidf鍘诲叧鑱� +// svyLibScriptMapper.insertSvyLibScript(svyLibScript); +// } +// return 1; +// } /** * 鏂板鎴栦慨鏀归棶鍗锋ā鏉夸俊鎭� @@ -153,31 +156,33 @@ } //澶勭悊棰樼洰 - if (CollectionUtils.isNotEmpty(svyLibTemplate.getSvyLibTopics())) { - for (SvyLibScript svyLibTopic : svyLibTemplate.getSvyLibTopics()) { + if (CollectionUtils.isNotEmpty(svyLibTemplate.getSvyLibScripts())) { + for (SvyLibTemplateScript svyLibScript : svyLibTemplate.getSvyLibScripts()) { + SvyLibTemplateScript svyLibTemplateScript = DtoConversionUtils.sourceToTarget(svyLibScript, SvyLibTemplateScript.class); //瀵归鐩繘琛屽鐞� - if (svyLibTopic.getIsoperation() != null && svyLibTopic.getIsoperation() == 1) { + if (svyLibScript.getIsoperation() != null && svyLibScript.getIsoperation() == 1) { //鏂板 - svyLibTopic.setSvyid(svyLibTemplate.getSvyid()); - //棰樼洰鐨勯�夐」鐩紝鐩存帴鐢╯vy_topicoption琛紝鐢╯vyTopicid鍘诲叧鑱� - svyLibScriptMapper.insertSvyLibScript(svyLibTopic); - } else if (svyLibTopic.getIsoperation() != null && svyLibTopic.getIsoperation() == 2) { + svyLibTemplateScript.setSvyid(svyLibTemplate.getSvyid()); + svyLibTemplateScript.setId(null); + svyLibTemplateScriptMapper.insertSvyLibTemplateScript(svyLibTemplateScript); + + } else if (svyLibScript.getIsoperation() != null && svyLibScript.getIsoperation() == 2) { //淇敼 - svyLibTopic.setSvyid(svyLibTemplate.getSvyid()); - svyLibScriptMapper.updateSvyLibScript(svyLibTopic); + svyLibTemplateScript.setSvyid(svyLibTemplate.getSvyid()); + svyLibTemplateScriptMapper.updateSvyLibTemplateScript(svyLibTemplateScript); } //瀵归鐩�夐」杩涜澶勭悊 - if (CollectionUtils.isNotEmpty(svyLibTopic.getSvyLibScriptOptions())) { - for (SvyLibScriptOption svyLibTopicoption : svyLibTopic.getSvyLibScriptOptions()) { - if (svyLibTopicoption.getIsoperation() != null && svyLibTopicoption.getIsoperation() == 1) { + if (CollectionUtils.isNotEmpty(svyLibScript.getSvyLibTemplateTargetoptions())) { + for (SvyLibTemplateTargetoption svyLibTemplateTargetoption : svyLibScript.getSvyLibTemplateTargetoptions()) { + if (svyLibTemplateTargetoption.getIsoperation() != null && svyLibTemplateTargetoption.getIsoperation() == 1) { //鏂板 - svyLibTopicoption.setTopicid(svyLibTopic.getId()); - svyLibTopicoptionMapper.insertSvyLibScriptOption(svyLibTopicoption); - } else if (svyLibTopicoption.getIsoperation() != null && svyLibTopicoption.getIsoperation() == 2) { + svyLibTemplateTargetoption.setScriptid(svyLibScript.getId()); + svyLibTemplateTargetoptionMapper.insertSvyLibTemplateTargetoption(svyLibTemplateTargetoption); + } else if (svyLibTemplateTargetoption.getIsoperation() != null && svyLibTemplateTargetoption.getIsoperation() == 2) { //淇敼 - svyLibTopicoption.setTopicid(svyLibTopic.getId()); - svyLibTopicoptionMapper.updateSvyLibScriptOption(svyLibTopicoption); + svyLibTemplateTargetoption.setScriptid(svyLibScript.getId()); + svyLibTemplateTargetoptionMapper.updateSvyLibTemplateTargetoption(svyLibTemplateTargetoption); } } diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateTargetoptionServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateTargetoptionServiceImpl.java new file mode 100644 index 0000000..7d07013 --- /dev/null +++ b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateTargetoptionServiceImpl.java @@ -0,0 +1,90 @@ +package com.smartor.service.impl; + +import com.ruoyi.common.utils.DateUtils; +import com.smartor.domain.SvyLibTemplateTargetoption; +import com.smartor.mapper.SvyLibTemplateTargetoptionMapper; +import com.smartor.service.ISvyLibTemplateTargetoptionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 闂嵎闂鎸囨爣閫夐」搴揝ervice涓氬姟灞傚鐞� + * + * @author ruoyi + * @date 2024-06-18 + */ +@Service +public class SvyLibTemplateTargetoptionServiceImpl implements ISvyLibTemplateTargetoptionService { + @Autowired + private SvyLibTemplateTargetoptionMapper svyLibTemplateTargetoptionMapper; + + /** + * 鏌ヨ闂嵎闂鎸囨爣閫夐」搴� + * + * @param id 闂嵎闂鎸囨爣閫夐」搴撲富閿� + * @return 闂嵎闂鎸囨爣閫夐」搴� + */ + @Override + public SvyLibTemplateTargetoption selectSvyLibTemplateTargetoptionById(Long id) { + return svyLibTemplateTargetoptionMapper.selectSvyLibTemplateTargetoptionById(id); + } + + /** + * 鏌ヨ闂嵎闂鎸囨爣閫夐」搴撳垪琛� + * + * @param svyLibTemplateTargetoption 闂嵎闂鎸囨爣閫夐」搴� + * @return 闂嵎闂鎸囨爣閫夐」搴� + */ + @Override + public List<SvyLibTemplateTargetoption> selectSvyLibTemplateTargetoptionList(SvyLibTemplateTargetoption svyLibTemplateTargetoption) { + return svyLibTemplateTargetoptionMapper.selectSvyLibTemplateTargetoptionList(svyLibTemplateTargetoption); + } + + /** + * 鏂板闂嵎闂鎸囨爣閫夐」搴� + * + * @param svyLibTemplateTargetoption 闂嵎闂鎸囨爣閫夐」搴� + * @return 缁撴灉 + */ + @Override + public int insertSvyLibTemplateTargetoption(SvyLibTemplateTargetoption svyLibTemplateTargetoption) { + svyLibTemplateTargetoption.setCreateTime(DateUtils.getNowDate()); + return svyLibTemplateTargetoptionMapper.insertSvyLibTemplateTargetoption(svyLibTemplateTargetoption); + } + + /** + * 淇敼闂嵎闂鎸囨爣閫夐」搴� + * + * @param svyLibTemplateTargetoption 闂嵎闂鎸囨爣閫夐」搴� + * @return 缁撴灉 + */ + @Override + public int updateSvyLibTemplateTargetoption(SvyLibTemplateTargetoption svyLibTemplateTargetoption) { + svyLibTemplateTargetoption.setUpdateTime(DateUtils.getNowDate()); + return svyLibTemplateTargetoptionMapper.updateSvyLibTemplateTargetoption(svyLibTemplateTargetoption); + } + + /** + * 鎵归噺鍒犻櫎闂嵎闂鎸囨爣閫夐」搴� + * + * @param ids 闇�瑕佸垹闄ょ殑闂嵎闂鎸囨爣閫夐」搴撲富閿� + * @return 缁撴灉 + */ + @Override + public int deleteSvyLibTemplateTargetoptionByIds(Long[] ids) { + return svyLibTemplateTargetoptionMapper.deleteSvyLibTemplateTargetoptionByIds(ids); + } + + /** + * 鍒犻櫎闂嵎闂鎸囨爣閫夐」搴撲俊鎭� + * + * @param id 闂嵎闂鎸囨爣閫夐」搴撲富閿� + * @return 缁撴灉 + */ + @Override + public int deleteSvyLibTemplateTargetoptionById(Long id) { + return svyLibTemplateTargetoptionMapper.deleteSvyLibTemplateTargetoptionById(id); + } +} diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml index e423228..84d55dc 100644 --- a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml @@ -49,11 +49,13 @@ <result property="tag" column="tag"/> <result property="valueType" column="value_type"/> <result property="reply" column="reply"/> + <result property="targetdesc" column="targetdesc"/> </resultMap> <sql id="selectIvrLibaScriptVo"> select id, suitway, + targetdesc, campus, deptNames, deptIds, @@ -176,6 +178,7 @@ <if test="otherdata != null">otherdata,</if> <if test="valueType != null">value_type,</if> <if test="reply != null">reply,</if> + <if test="targetdesc != null">targetdesc,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="questiontitle != null">#{questiontitle},</if> @@ -222,6 +225,7 @@ <if test="otherdata != null">#{otherdata},</if> <if test="valueType != null">#{valueType},</if> <if test="reply != null">#{reply},</if> + <if test="targetdesc != null">#{targetdesc},</if> </trim> </insert> @@ -273,6 +277,7 @@ <if test="tag != null">tag = #{tag},</if> <if test="valueType != null">value_type = #{valueType},</if> <if test="reply != null">reply = #{reply},</if> + <if test="targetdesc != null">targetdesc = #{targetdesc},</if> </trim> where id = #{id} </update> diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml index 5444bdc..1779932 100644 --- a/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml @@ -11,6 +11,7 @@ <result property="scripttype" column="script_type"/> <result property="scriptcode" column="script_code"/> <result property="script" column="script"/> + <result property="scriptPicture" column="script_picture"/> <result property="sort" column="sort"/> <result property="ismandatory" column="ismandatory"/> <result property="ishide" column="ishide"/> @@ -31,17 +32,24 @@ <result property="otherdata" column="otherdata"/> <result property="valueType" column="value_type"/> <result property="reply" column="reply"/> + <result property="scoretype" column="scoretype"/> + <result property="score" column="score"/> + <result property="icd10Name" column="icd10_name"/> + <result property="topic" column="topic"/> </resultMap> <sql id="selectSvyLibScriptVo"> select id, oldid, + scoretype, + score, value_type, reply, svyid, script_type, script_code, script, + topic, sort, ismandatory, ishide, @@ -59,7 +67,9 @@ suitway, isavailable, otherdata, + script_picture, language, + icd10_name, svy_scriptid as svyscriptId from svy_lib_script </sql> @@ -73,6 +83,7 @@ <if test="scripttype != null and scripttype != ''">and script_type = #{scripttype}</if> <if test="categoryid != null ">and categoryid = #{categoryid}</if> <if test="script != null and script != ''">and script like concat('%', #{script}, '%')</if> + <if test="icd10Name != null and icd10Name != ''">and icd10_name like concat('%', #{icd10Name}, '%')</if> <if test="ishide != null ">and ishide = #{ishide}</if> <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> @@ -81,6 +92,9 @@ <if test="suitway != null and suitway != ''">and suitway = #{suitway}</if> <if test="isavailable != null and isavailable != ''">and isavailable = #{isavailable}</if> <if test="language != null and language != ''">and language = #{language}</if> + <if test="scoretype != null and scoretype != ''">and scoretype = #{scoretype}</if> + <if test="score != null and score != ''">and score = #{score}</if> + <if test="topic != null and topic != ''">and topic = #{topic}</if> </where> </select> @@ -119,6 +133,11 @@ <if test="otherdata != null and otherdata!=''">otherdata,</if> <if test="valueType != null and valueType!=''">value_type,</if> <if test="reply != null and reply!=''">otherdata,</if> + <if test="scoretype != null and scoretype!=''">scoretype,</if> + <if test="score != null and score!=''">score,</if> + <if test="icd10Name != null and icd10Name!=''">icd10_name,</if> + <if test="scriptPicture != null and scriptPicture != ''">script_picture,</if> + <if test="topic != null and topic != ''">topic,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="oldid != null">#{oldid},</if> @@ -147,6 +166,11 @@ <if test="otherdata != null and otherdata!=''">#{otherdata},</if> <if test="valueType != null and valueType!=''">#{valueType},</if> <if test="reply != null and reply!=''">#{therdata},</if> + <if test="scoretype != null and scoretype!=''">#{scoretype},</if> + <if test="score != null and score!=''">#{score},</if> + <if test="icd10Name != null and icd10Name!=''">#{icd10Name},</if> + <if test="scriptPicture != null and scriptPicture != ''">#{scriptPicture},</if> + <if test="topic != null and topic != ''">#{topic},</if> </trim> </insert> @@ -178,6 +202,11 @@ <if test="otherdata != null and otherdata!=''">otherdata = #{otherdata},</if> <if test="valueType != null and valueType!=''">value_type = #{valueType},</if> <if test="reply != null and reply!=''">therdata =#{therdata},</if> + <if test="scoretype != null and scoretype!=''">scoretype = #{scoretype},</if> + <if test="score != null and score!=''">score = #{score},</if> + <if test="icd10Name != null and icd10Name!=''">icd10_name = #{icd10Name},</if> + <if test="scriptPicture != null and scriptPicture != ''">script_picture = #{scriptPicture},</if> + <if test="topic != null and topic != ''">topic = #{topic},</if> </trim> where id = #{id} </update> diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml index ca0fcb6..2ef18f7 100644 --- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml @@ -33,6 +33,8 @@ <result property="otherdata" column="otherdata"/> <result property="valueType" column="value_type"/> <result property="reply" column="reply"/> + <result property="scriptScore" column="script_score"/> + <result property="scoreType" column="score_type"/> </resultMap> <sql id="selectSvyLibTemplateVo"> @@ -40,6 +42,7 @@ categoryid, value_type, reply, + score_type, svycode, svyname, description, @@ -63,6 +66,7 @@ label_info, campus, suitway, + script_score, otherdata from svy_lib_template </sql> @@ -72,7 +76,7 @@ a.version,a.centerlibrarycode, a.centerlibraryid, a.islocal, a.isenable, a.orgid, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.isupload, a.upload_time,a.dept_names,a.value_type,a.label_info,a.reply, - a.campus,a.suitway,a.otherdata + a.campus,a.suitway,a.script_score,a.score_type,a.otherdata ,c.icdname from svy_lib_template a,icd10_association b,icd10 c <where> @@ -122,6 +126,8 @@ <if test="otherdata != null">otherdata,</if> <if test="valueType != null">value_type,</if> <if test="reply != null">reply,</if> + <if test="scriptScore != null">script_score,</if> + <if test="scoreType != null">score_type,</if> value_type, reply, </trim> @@ -153,6 +159,8 @@ <if test="otherdata != null">#{otherdata},</if> <if test="valueType != null">#{valueType},</if> <if test="reply != null">#{reply},</if> + <if test="scriptScore != null">#{scriptScore},</if> + <if test="scoreType != null">#{scoreType},</if> </trim> </insert> @@ -186,6 +194,8 @@ <if test="otherdata != null">otherdata=#{otherdata},</if> <if test="valueType != null">value_type = #{valueType},</if> <if test="reply != null">reply = #{reply},</if> + <if test="scriptScore != null">script_score = #{scriptScore},</if> + <if test="scoreType != null">score_type = #{scoreType},</if> </trim> where svyid = #{svyid} </update> diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml new file mode 100644 index 0000000..6a47143 --- /dev/null +++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml @@ -0,0 +1,230 @@ +<?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.SvyLibTemplateScriptMapper"> + + <resultMap type="com.smartor.domain.SvyLibTemplateScript" id="SvyLibTemplateScriptResult"> + <result property="id" column="id"/> + <result property="oldid" column="oldid"/> + <result property="svyid" column="svyid"/> + <result property="scriptType" column="script_type"/> + <result property="scriptCode" column="script_code"/> + <result property="script" column="script"/> + <result property="tag" column="tag"/> + <result property="sort" column="sort"/> + <result property="ismandatory" column="ismandatory"/> + <result property="ishide" column="ishide"/> + <result property="delFlag" column="del_flag"/> + <result property="orgid" column="orgid"/> + <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="svyTopicid" column="svy_topicid"/> + <result property="pid" column="pid"/> + <result property="guid" column="guid"/> + <result property="categoryid" column="categoryid"/> + <result property="scriptContent" column="script_content"/> + <result property="suitway" column="suitway"/> + <result property="isavailable" column="isavailable"/> + <result property="language" column="language"/> + <result property="otherdata" column="otherdata"/> + <result property="valueType" column="value_type"/> + <result property="reply" column="reply"/> + <result property="scoretype" column="scoretype"/> + <result property="score" column="score"/> + <result property="scriptPicture" column="script_picture"/> + </resultMap> + + <sql id="selectSvyLibTemplateScriptVo"> + select id, + oldid, + svyid, + script_type, + script_code, + script, + tag, + sort, + ismandatory, + ishide, + del_flag, + orgid, + create_by, + create_time, + update_by, + update_time, + isupload, + upload_time, + svy_topicid, + pid, + guid, + categoryid, + script_content, + suitway, + script_picture, + isavailable, language, otherdata, value_type, reply, scoretype, score + from svy_lib_template_script + </sql> + + <select id="selectSvyLibTemplateScriptList" parameterType="com.smartor.domain.SvyLibTemplateScript" + resultMap="SvyLibTemplateScriptResult"> + <include refid="selectSvyLibTemplateScriptVo"/> + <where> + <if test="oldid != null ">and oldid = #{oldid}</if> + <if test="svyid != null ">and svyid = #{svyid}</if> + <if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if> + <if test="scriptCode != null and scriptCode != ''">and script_code = #{scriptCode}</if> + <if test="script != null and script != ''">and script = #{script}</if> + <if test="tag != null and tag != ''">and tag = #{tag}</if> + <if test="sort != null ">and sort = #{sort}</if> + <if test="ismandatory != null and ismandatory != ''">and ismandatory = #{ismandatory}</if> + <if test="ishide != null ">and ishide = #{ishide}</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="svyTopicid != null ">and svy_topicid = #{svyTopicid}</if> + <if test="pid != null ">and pid = #{pid}</if> + <if test="guid != null and guid != ''">and guid = #{guid}</if> + <if test="categoryid != null ">and categoryid = #{categoryid}</if> + <if test="scriptContent != null and scriptContent != ''">and script_content = #{scriptContent}</if> + <if test="suitway != null and suitway != ''">and suitway = #{suitway}</if> + <if test="isavailable != null and isavailable != ''">and isavailable = #{isavailable}</if> + <if test="language != null and language != ''">and language = #{language}</if> + <if test="otherdata != null and otherdata != ''">and otherdata = #{otherdata}</if> + <if test="valueType != null and valueType != ''">and value_type = #{valueType}</if> + <if test="reply != null and reply != ''">and reply = #{reply}</if> + <if test="scoretype != null and scoretype != ''">and scoretype = #{scoretype}</if> + <if test="score != null and score != ''">and score = #{score}</if> + </where> + </select> + + <select id="selectSvyLibTemplateScriptByTopicid" parameterType="Long" resultMap="SvyLibTemplateScriptResult"> + <include refid="selectSvyLibTemplateScriptVo"/> + where id = #{id} + </select> + + <insert id="insertSvyLibTemplateScript" parameterType="com.smartor.domain.SvyLibTemplateScript" + useGeneratedKeys="true" keyProperty="id"> + insert into svy_lib_template_script + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="oldid != null">oldid,</if> + <if test="svyid != null">svyid,</if> + <if test="scriptType != null">script_type,</if> + <if test="scriptCode != null">script_code,</if> + <if test="script != null">script,</if> + <if test="tag != null">tag,</if> + <if test="sort != null">sort,</if> + <if test="ismandatory != null">ismandatory,</if> + <if test="ishide != null">ishide,</if> + <if test="delFlag != null">del_flag,</if> + <if test="orgid != null">orgid,</if> + <if test="createBy != null">create_by,</if> + <if test="createTime != null">create_time,</if> + <if test="updateBy != null">update_by,</if> + <if test="updateTime != null">update_time,</if> + <if test="isupload != null">isupload,</if> + <if test="uploadTime != null">upload_time,</if> + <if test="svyTopicid != null">svy_topicid,</if> + <if test="pid != null">pid,</if> + <if test="guid != null">guid,</if> + <if test="categoryid != null">categoryid,</if> + <if test="scriptContent != null">script_content,</if> + <if test="suitway != null">suitway,</if> + <if test="isavailable != null">isavailable,</if> + <if test="language != null">language,</if> + <if test="otherdata != null">otherdata,</if> + <if test="valueType != null">value_type,</if> + <if test="reply != null">reply,</if> + <if test="scoretype != null">scoretype,</if> + <if test="score != null">score,</if> + <if test="scriptPicture != null">script_picture,</if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="oldid != null">#{oldid},</if> + <if test="svyid != null">#{svyid},</if> + <if test="scriptType != null">#{scriptType},</if> + <if test="scriptCode != null">#{scriptCode},</if> + <if test="script != null">#{script},</if> + <if test="tag != null">#{tag},</if> + <if test="sort != null">#{sort},</if> + <if test="ismandatory != null">#{ismandatory},</if> + <if test="ishide != null">#{ishide},</if> + <if test="delFlag != null">#{delFlag},</if> + <if test="orgid != null">#{orgid},</if> + <if test="createBy != null">#{createBy},</if> + <if test="createTime != null">#{createTime},</if> + <if test="updateBy != null">#{updateBy},</if> + <if test="updateTime != null">#{updateTime},</if> + <if test="isupload != null">#{isupload},</if> + <if test="uploadTime != null">#{uploadTime},</if> + <if test="svyTopicid != null">#{svyTopicid},</if> + <if test="pid != null">#{pid},</if> + <if test="guid != null">#{guid},</if> + <if test="categoryid != null">#{categoryid},</if> + <if test="scriptContent != null">#{scriptContent},</if> + <if test="suitway != null">#{suitway},</if> + <if test="isavailable != null">#{isavailable},</if> + <if test="language != null">#{language},</if> + <if test="otherdata != null">#{otherdata},</if> + <if test="valueType != null">#{valueType},</if> + <if test="reply != null">#{reply},</if> + <if test="scoretype != null">#{scoretype},</if> + <if test="score != null">#{score},</if> + <if test="scriptPicture != null">#{scriptPicture},</if> + </trim> + </insert> + + <update id="updateSvyLibTemplateScript" parameterType="com.smartor.domain.SvyLibTemplateScript"> + update svy_lib_template_script + <trim prefix="SET" suffixOverrides=","> + <if test="oldid != null">oldid = #{oldid},</if> + <if test="svyid != null">svyid = #{svyid},</if> + <if test="scriptType != null">script_type = #{scriptType},</if> + <if test="scriptCode != null">script_code = #{scriptCode},</if> + <if test="script != null">script = #{script},</if> + <if test="tag != null">tag = #{tag},</if> + <if test="sort != null">sort = #{sort},</if> + <if test="ismandatory != null">ismandatory = #{ismandatory},</if> + <if test="ishide != null">ishide = #{ishide},</if> + <if test="delFlag != null">del_flag = #{delFlag},</if> + <if test="orgid != null">orgid = #{orgid},</if> + <if test="createBy != null">create_by = #{createBy},</if> + <if test="createTime != null">create_time = #{createTime},</if> + <if test="updateBy != null">update_by = #{updateBy},</if> + <if test="updateTime != null">update_time = #{updateTime},</if> + <if test="isupload != null">isupload = #{isupload},</if> + <if test="uploadTime != null">upload_time = #{uploadTime},</if> + <if test="svyTopicid != null">svy_topicid = #{svyTopicid},</if> + <if test="pid != null">pid = #{pid},</if> + <if test="guid != null">guid = #{guid},</if> + <if test="categoryid != null">categoryid = #{categoryid},</if> + <if test="scriptContent != null">script_content = #{scriptContent},</if> + <if test="suitway != null">suitway = #{suitway},</if> + <if test="isavailable != null">isavailable = #{isavailable},</if> + <if test="language != null">language = #{language},</if> + <if test="otherdata != null">otherdata = #{otherdata},</if> + <if test="valueType != null">value_type = #{valueType},</if> + <if test="reply != null">reply = #{reply},</if> + <if test="scoretype != null">scoretype = #{scoretype},</if> + <if test="score != null">score = #{score},</if> + <if test="scriptPicture != null">script_picture = #{scriptPicture},</if> + </trim> + where id = #{id} + </update> + + <delete id="deleteSvyLibTemplateScriptByTopicid" parameterType="Long"> + delete + from svy_lib_template_script + where id = #{id} + </delete> + + <delete id="deleteSvyLibTemplateScriptByTopicids" parameterType="String"> + delete from svy_lib_template_script where id in + <foreach item="id" collection="array" open="(" separator="," close=")"> + #{id} + </foreach> + </delete> +</mapper> diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml new file mode 100644 index 0000000..138bfe8 --- /dev/null +++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml @@ -0,0 +1,222 @@ +<?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.SvyLibTemplateTargetoptionMapper"> + + <resultMap type="com.smartor.domain.SvyLibTemplateTargetoption" id="SvyLibTemplateTargetoptionResult"> + <result property="id" column="id"/> + <result property="groupid" column="groupid"/> + <result property="categoryName" column="categoryName"/> + <result property="scriptid" column="scriptid"/> + <result property="templateID" column="templateID"/> + <result property="targettype" column="targettype"/> + <result property="targetid" column="targetid"/> + <result property="targetname" column="targetname"/> + <result property="targetvalue" column="targetvalue"/> + <result property="isabnormal" column="isabnormal"/> + <result property="warnup" column="warnup"/> + <result property="warndown" column="warndown"/> + <result property="targetregex" column="targetregex"/> + <result property="targetregex2" column="targetregex2"/> + <result property="dynamiccruxsJson" column="dynamiccruxs"/> + <result property="nodynamiccruxsJson" column="nodynamiccruxs"/> + <result property="optiondesc" column="optiondesc"/> + <result property="nextQuestion" column="next_question"/> + <result property="language" column="language"/> + <result property="version" column="version"/> + <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="orgid" column="orgid"/> + <result property="pid" column="pid"/> + <result property="guid" column="guid"/> + <result property="picturePath" column="picture_path"/> + </resultMap> + + <sql id="selectSvyLibTemplateTargetoptionVo"> + select id, + groupid, + categoryName, + scriptid, + templateID, + targettype, + targetid, + targetname, + targetvalue, + isabnormal, + warnup, + warndown, + targetregex, + targetregex2, + dynamiccruxs, + nodynamiccruxs, + optiondesc, + next_question, language, version, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, picture_path + from svy_lib_template_targetoption + </sql> + + <select id="selectSvyLibTemplateTargetoptionList" parameterType="com.smartor.domain.SvyLibTemplateTargetoption" + resultMap="SvyLibTemplateTargetoptionResult"> + <include refid="selectSvyLibTemplateTargetoptionVo"/> + <where> + <if test="groupid != null and groupid != ''">and groupid = #{groupid}</if> + <if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName}, + '%') + </if> + <if test="scriptid != null ">and scriptid = #{scriptid}</if> + <if test="templateID != null ">and templateID = #{templateID}</if> + <if test="targettype != null and targettype != ''">and targettype = #{targettype}</if> + <if test="targetid != null ">and targetid = #{targetid}</if> + <if test="targetname != null and targetname != ''">and targetname like concat('%', #{targetname}, '%')</if> + <if test="targetvalue != null and targetvalue != ''">and targetvalue = #{targetvalue}</if> + <if test="isabnormal != null ">and isabnormal = #{isabnormal}</if> + <if test="warnup != null ">and warnup = #{warnup}</if> + <if test="warndown != null ">and warndown = #{warndown}</if> + <if test="targetregex != null and targetregex != ''">and targetregex = #{targetregex}</if> + <if test="targetregex2 != null and targetregex2 != ''">and targetregex2 = #{targetregex2}</if> + <if test="dynamiccruxsJson != null and dynamiccruxsJson != ''">and dynamiccruxs = #{dynamiccruxsJson}</if> + <if test="nodynamiccruxsJson != null and nodynamiccruxsJson != ''">and nodynamiccruxs = + #{nodynamiccruxsJson} + </if> + <if test="optiondesc != null and optiondesc != ''">and optiondesc = #{optiondesc}</if> + <if test="nextQuestion != null ">and next_question = #{nextQuestion}</if> + <if test="language != null and language != ''">and language = #{language}</if> + <if test="version != null and version != ''">and version = #{version}</if> + <if test="isupload != null ">and isupload = #{isupload}</if> + <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> + <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> + <if test="pid != null ">and pid = #{pid}</if> + <if test="guid != null and guid != ''">and guid = #{guid}</if> + <if test="picturePath != null and picturePath != ''">and picture_path = #{picturePath}</if> + </where> + </select> + + <select id="selectSvyLibTemplateTargetoptionById" parameterType="Long" resultMap="SvyLibTemplateTargetoptionResult"> + <include refid="selectSvyLibTemplateTargetoptionVo"/> + where id = #{id} + </select> + + <insert id="insertSvyLibTemplateTargetoption" parameterType="com.smartor.domain.SvyLibTemplateTargetoption" + useGeneratedKeys="true" keyProperty="id"> + insert into svy_lib_template_targetoption + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="groupid != null">groupid,</if> + <if test="categoryName != null">categoryName,</if> + <if test="scriptid != null">scriptid,</if> + <if test="templateID != null">templateID,</if> + <if test="targettype != null">targettype,</if> + <if test="targetid != null">targetid,</if> + <if test="targetname != null">targetname,</if> + <if test="targetvalue != null">targetvalue,</if> + <if test="isabnormal != null">isabnormal,</if> + <if test="warnup != null">warnup,</if> + <if test="warndown != null">warndown,</if> + <if test="targetregex != null">targetregex,</if> + <if test="targetregex2 != null">targetregex2,</if> + <if test="dynamiccruxs != null">dynamiccruxs,</if> + <if test="nodynamiccruxs != null">nodynamiccruxs,</if> + <if test="optiondesc != null">optiondesc,</if> + <if test="nextQuestion != null">next_question,</if> + <if test="language != null">language,</if> + <if test="version != null">version,</if> + <if test="delFlag != null">del_flag,</if> + <if test="updateBy != null">update_by,</if> + <if test="updateTime != null">update_time,</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="orgid != null">orgid,</if> + <if test="pid != null">pid,</if> + <if test="guid != null">guid,</if> + <if test="picturePath != null">picture_path,</if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="groupid != null">#{groupid},</if> + <if test="categoryName != null">#{categoryName},</if> + <if test="scriptid != null">#{scriptid},</if> + <if test="templateID != null">#{templateID},</if> + <if test="targettype != null">#{targettype},</if> + <if test="targetid != null">#{targetid},</if> + <if test="targetname != null">#{targetname},</if> + <if test="targetvalue != null">#{targetvalue},</if> + <if test="isabnormal != null">#{isabnormal},</if> + <if test="warnup != null">#{warnup},</if> + <if test="warndown != null">#{warndown},</if> + <if test="targetregex != null">#{targetregex},</if> + <if test="targetregex2 != null">#{targetregex2},</if> + <if test="dynamiccruxs != null">#{dynamiccruxsJson},</if> + <if test="nodynamiccruxs != null">#{nodynamiccruxsJson},</if> + <if test="optiondesc != null">#{optiondesc},</if> + <if test="nextQuestion != null">#{nextQuestion},</if> + <if test="language != null">#{language},</if> + <if test="version != null">#{version},</if> + <if test="delFlag != null">#{delFlag},</if> + <if test="updateBy != null">#{updateBy},</if> + <if test="updateTime != null">#{updateTime},</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="orgid != null">#{orgid},</if> + <if test="pid != null">#{pid},</if> + <if test="guid != null">#{guid},</if> + <if test="picturePath != null">#{picturePath},</if> + </trim> + </insert> + + <update id="updateSvyLibTemplateTargetoption" parameterType="com.smartor.domain.SvyLibTemplateTargetoption"> + update svy_lib_template_targetoption + <trim prefix="SET" suffixOverrides=","> + <if test="groupid != null">groupid = #{groupid},</if> + <if test="categoryName != null">categoryName = #{categoryName},</if> + <if test="scriptid != null">scriptid = #{scriptid},</if> + <if test="templateID != null">templateID = #{templateID},</if> + <if test="targettype != null">targettype = #{targettype},</if> + <if test="targetid != null">targetid = #{targetid},</if> + <if test="targetname != null">targetname = #{targetname},</if> + <if test="targetvalue != null">targetvalue = #{targetvalue},</if> + <if test="isabnormal != null">isabnormal = #{isabnormal},</if> + <if test="warnup != null">warnup = #{warnup},</if> + <if test="warndown != null">warndown = #{warndown},</if> + <if test="targetregex != null">targetregex = #{targetregex},</if> + <if test="targetregex2 != null">targetregex2 = #{targetregex2},</if> + <if test="dynamiccruxs != null">dynamiccruxs = #{dynamiccruxsJson},</if> + <if test="nodynamiccruxs != null">nodynamiccruxs = #{nodynamiccruxsJson},</if> + <if test="optiondesc != null">optiondesc = #{optiondesc},</if> + <if test="nextQuestion != null">next_question = #{nextQuestion},</if> + <if test="language != null">language = #{language},</if> + <if test="version != null">version = #{version},</if> + <if test="delFlag != null">del_flag = #{delFlag},</if> + <if test="updateBy != null">update_by = #{updateBy},</if> + <if test="updateTime != null">update_time = #{updateTime},</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="orgid != null">orgid = #{orgid},</if> + <if test="pid != null">pid = #{pid},</if> + <if test="guid != null">guid = #{guid},</if> + <if test="picturePath != null">picture_path = #{picturePath},</if> + </trim> + where id = #{id} + </update> + + <delete id="deleteSvyLibTemplateTargetoptionById" parameterType="Long"> + delete + from svy_lib_template_targetoption + where id = #{id} + </delete> + + <delete id="deleteSvyLibTemplateTargetoptionByIds" parameterType="String"> + delete from svy_lib_template_targetoption where id in + <foreach item="id" collection="array" open="(" separator="," close=")"> + #{id} + </foreach> + </delete> +</mapper> diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskScriptMapper.xml index ac266f5..40ac9bd 100644 --- a/smartor/src/main/resources/mapper/smartor/SvyTaskScriptMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/SvyTaskScriptMapper.xml @@ -31,11 +31,11 @@ <result property="scoretype" column="scoretype" /> <result property="score" column="score" /> <result property="showtype" column="showtype" /> - <result property="picturePath" column="picture_path" /> + <result property="scriptPicture" column="script_picture" /> </resultMap> <sql id="selectSvyTaskScriptVo"> - select id, script_type, script_code, script, tag, sort, ismandatory, ishide, del_flag, orgid, create_by, create_time, update_by, update_time, isupload, upload_time, answer, pid, guid, taskid, optiondesc, nexttopicid, nexttopicsort, scoretype, score, showtype, picture_path from svy_task_script + select id, script_type, script_code, script, tag, sort, ismandatory, ishide, del_flag, orgid, create_by, create_time, update_by, update_time, isupload, upload_time, answer, pid, guid, taskid, optiondesc, nexttopicid, nexttopicsort, scoretype, score, showtype, script_picture from svy_task_script </sql> <select id="selectSvyTaskScriptList" parameterType="com.smartor.domain.SvyTaskScript" resultMap="SvyTaskScriptResult"> @@ -98,7 +98,7 @@ <if test="scoretype != null">scoretype,</if> <if test="score != null">score,</if> <if test="showtype != null">showtype,</if> - <if test="picturePath != null">picture_path,</if> + <if test="scriptPicture != null">script_picture,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="scriptType != null">#{scriptType},</if> @@ -126,7 +126,7 @@ <if test="scoretype != null">#{scoretype},</if> <if test="score != null">#{score},</if> <if test="showtype != null">#{showtype},</if> - <if test="picturePath != null">#{picturePath},</if> + <if test="scriptPicture != null">#{scriptPicture},</if> </trim> </insert> @@ -159,6 +159,7 @@ <if test="score != null">score = #{score},</if> <if test="showtype != null">showtype = #{showtype},</if> <if test="picturePath != null">picture_path = #{picturePath},</if> + <if test="scriptPicture != null">script_picture = #{scriptPicture},</if> </trim> where id = #{id} </update> -- Gitblit v1.9.3