liusheng
2023-06-21 3acec3660921f22b58bdaa85d61a2fcfba8e6c98
问卷列表
已添加1个文件
已修改7个文件
596 ■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyCategoryController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTitleController.java 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTitle.java 284 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTitleReq.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/SvyLibTitleMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/ISvyLibTitleService.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/SvyLibTitleServiceImpl.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyLibTitleMapper.xml 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyCategoryController.java
@@ -70,6 +70,7 @@
     */
    @PreAuthorize("@ss.hasPermi('smartor:svycategory:add')")
    @Log(title = "问卷分类", businessType = BusinessType.INSERT)
    @ApiOperation("新增问卷分类")
    @PostMapping
    public AjaxResult add(@RequestBody SvyCategory svyCategory) {
        return toAjax(svyCategoryService.insertSvyCategory(svyCategory));
@@ -80,6 +81,7 @@
     */
    @PreAuthorize("@ss.hasPermi('smartor:svycategory:edit')")
    @Log(title = "问卷分类", businessType = BusinessType.UPDATE)
    @ApiOperation("修改问卷分类")
    @PutMapping
    public AjaxResult edit(@RequestBody SvyCategory svyCategory) {
        return toAjax(svyCategoryService.updateSvyCategory(svyCategory));
@@ -90,6 +92,7 @@
     */
    @PreAuthorize("@ss.hasPermi('smartor:svycategory:remove')")
    @Log(title = "问卷分类", businessType = BusinessType.DELETE)
    @ApiOperation("删除问卷分类")
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(svyCategoryService.deleteSvyCategoryByIds(ids));
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTitleController.java
@@ -2,6 +2,10 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.smartor.domain.SvyLibTitleReq;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -23,49 +27,48 @@
/**
 * é—®å·Controller
 *
 *
 * @author ruoyi
 * @date 2023-03-02
 */
@Api(description = "问卷")
@RestController
@RequestMapping("/smartor/svytitle")
public class SvyLibTitleController extends BaseController
{
public class SvyLibTitleController extends BaseController {
    @Autowired
    private ISvyLibTitleService svyLibTitleService;
    /**
     * æŸ¥è¯¢é—®å·åˆ—表
     */
    @ApiOperation("查询问卷列表")
    @PreAuthorize("@ss.hasPermi('smartor:svytitle:list')")
    @GetMapping("/list")
    public TableDataInfo list(SvyLibTitle svyLibTitle)
    {
    @GetMapping("/selectSvyLibTitlelist")
    public TableDataInfo selectSvyLibTitlelist(SvyLibTitleReq svyLibTitleReq) {
        startPage();
        List<SvyLibTitle> list = svyLibTitleService.selectSvyLibTitleList(svyLibTitle);
        List<SvyLibTitle> list = svyLibTitleService.selectSvyLibTitleList(svyLibTitleReq);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºé—®å·åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('smartor:svytitle:export')")
    @Log(title = "问卷", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, SvyLibTitle svyLibTitle)
    {
        List<SvyLibTitle> list = svyLibTitleService.selectSvyLibTitleList(svyLibTitle);
        ExcelUtil<SvyLibTitle> util = new ExcelUtil<SvyLibTitle>(SvyLibTitle.class);
        util.exportExcel(response, list, "问卷数据");
    }
//    /**
//     * å¯¼å‡ºé—®å·åˆ—表
//     */
//    @PreAuthorize("@ss.hasPermi('smartor:svytitle:export')")
//    @Log(title = "问卷", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, SvyLibTitle svyLibTitle)
//    {
//        List<SvyLibTitle> list = svyLibTitleService.selectSvyLibTitleList(svyLibTitle);
//        ExcelUtil<SvyLibTitle> util = new ExcelUtil<SvyLibTitle>(SvyLibTitle.class);
//        util.exportExcel(response, list, "问卷数据");
//    }
    /**
     * èŽ·å–é—®å·è¯¦ç»†ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('smartor:svytitle:query')")
    @GetMapping(value = "/{svyid}")
    public AjaxResult getInfo(@PathVariable("svyid") Long svyid)
    {
    public AjaxResult getInfo(@PathVariable("svyid") Long svyid) {
        return success(svyLibTitleService.selectSvyLibTitleBySvyid(svyid));
    }
@@ -75,8 +78,7 @@
    @PreAuthorize("@ss.hasPermi('smartor:svytitle:add')")
    @Log(title = "问卷", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody SvyLibTitle svyLibTitle)
    {
    public AjaxResult add(@RequestBody SvyLibTitle svyLibTitle) {
        return toAjax(svyLibTitleService.insertSvyLibTitle(svyLibTitle));
    }
@@ -86,8 +88,7 @@
    @PreAuthorize("@ss.hasPermi('smartor:svytitle:edit')")
    @Log(title = "问卷", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody SvyLibTitle svyLibTitle)
    {
    public AjaxResult edit(@RequestBody SvyLibTitle svyLibTitle) {
        return toAjax(svyLibTitleService.updateSvyLibTitle(svyLibTitle));
    }
@@ -96,9 +97,8 @@
     */
    @PreAuthorize("@ss.hasPermi('smartor:svytitle:remove')")
    @Log(title = "问卷", businessType = BusinessType.DELETE)
    @DeleteMapping("/{svyids}")
    public AjaxResult remove(@PathVariable Long[] svyids)
    {
    @DeleteMapping("/{svyids}")
    public AjaxResult remove(@PathVariable Long[] svyids) {
        return toAjax(svyLibTitleService.deleteSvyLibTitleBySvyids(svyids));
    }
}
smartor/src/main/java/com/smartor/domain/SvyLibTitle.java
@@ -2,7 +2,11 @@
import java.math.BigDecimal;
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;
@@ -10,259 +14,143 @@
/**
 * é—®å·å¯¹è±¡ svy_lib_title
 *
 *
 * @author ruoyi
 * @date 2023-03-02
 */
public class SvyLibTitle extends BaseEntity
{
@Data
@ApiModel(value = "MinioResponseDTO", description = "标签分类对象")
public class SvyLibTitle extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**  è‡ªå¢žID  */
    /**
     * è‡ªå¢žID
     */
    @ApiModelProperty(value = "自增ID")
    private Long svyid;
    /**  é—®å·åˆ†ç±»ID  */
    /**
     * é—®å·åˆ†ç±»ID
     */
    @ApiModelProperty(value = "问卷分类ID")
    @Excel(name = " é—®å·åˆ†ç±»ID ")
    private Long categoryid;
    /**  é—®å·ä»£ç   */
    /**
     * é—®å·ä»£ç 
     */
    @ApiModelProperty(value = "问卷代码")
    @Excel(name = " é—®å·ä»£ç  ")
    private String svycode;
    /**  é—®å·åç§°  */
    /**
     * é—®å·åç§°
     */
    @ApiModelProperty(value = "问卷名称")
    @Excel(name = " é—®å·åç§° ")
    private String svyname;
    /**  æè¿°  */
    /**
     * æè¿°
     */
    @ApiModelProperty(value = "描述")
    @Excel(name = " æè¿° ")
    private String description;
    /**  é—®å·ä»‹ç»  */
    /**
     * é—®å·ä»‹ç»
     */
    @ApiModelProperty(value = "问卷介绍")
    @Excel(name = " é—®å·ä»‹ç» ")
    private String introduce;
    /**  é—®å·æç¤º  */
    /**
     * é—®å·æç¤º
     */
    @ApiModelProperty(value = "问卷提示")
    @Excel(name = " é—®å·æç¤º ")
    private String submitprompt;
    /**  æ¨¡æ¿ID  */
    /**
     * æ¨¡æ¿ID
     */
    @ApiModelProperty(value = "模板ID")
    @Excel(name = " æ¨¡æ¿ID ")
    private Long templateid;
    /**  ç‰ˆæœ¬  */
    /**
     * ç‰ˆæœ¬
     */
    @ApiModelProperty(value = "版本")
    @Excel(name = " ç‰ˆæœ¬ ")
    private BigDecimal version;
    /**  ä¸­å¿ƒåº“代码  */
    /**
     * ä¸­å¿ƒåº“代码
     */
    @ApiModelProperty(value = "中心库代码")
    @Excel(name = " ä¸­å¿ƒåº“代码 ")
    private String centerlibrarycode;
    /**  ä¸­å¿ƒåº“ID  */
    /**
     * ä¸­å¿ƒåº“ID
     */
    @ApiModelProperty(value = "中心库ID")
    @Excel(name = " ä¸­å¿ƒåº“ID ")
    private Long centerlibraryid;
    /**  æ˜¯å¦æœ¬åœ°  */
    /**
     * æ˜¯å¦æœ¬åœ°
     */
    @ApiModelProperty(value = "是否本地")
    @Excel(name = " æ˜¯å¦æœ¬åœ° ")
    private Long islocal;
    /**  æ˜¯å¦å¯ç”¨  */
    /**
     * æ˜¯å¦å¯ç”¨
     */
    @ApiModelProperty(value = "是否启用")
    @Excel(name = " æ˜¯å¦å¯ç”¨ ")
    private Long isenable;
    /**  æœºæž„ID  */
    /**
     * æœºæž„ID
     */
    @ApiModelProperty(value = "机构ID")
    @Excel(name = " æœºæž„ID ")
    private String orgid;
    /**  åˆ é™¤æ ‡è®°  */
    /**
     * åˆ é™¤æ ‡è®°
     */
    @ApiModelProperty(value = "删除标记")
    private String delFlag;
    /**  ä¸Šä¼ æ ‡è®°  */
    /**
     * ä¸Šä¼ æ ‡è®°
     */
    @ApiModelProperty(value = "上传标记")
    @Excel(name = " ä¸Šä¼ æ ‡è®° ")
    private Long isupload;
    /**  ä¸Šä¼ æ—¶é—´  */
    /**
     * ä¸Šä¼ æ—¶é—´
     */
    @ApiModelProperty(value = "上传时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " ä¸Šä¼ æ—¶é—´ ", width = 30, dateFormat = "yyyy-MM-dd")
    private Date uploadTime;
    public void setSvyid(Long svyid)
    {
    /**
     * ç–¾ç—…名称
     */
    @ApiModelProperty(value = "疾病名称")
    private String icdname;
    public SvyLibTitle(Long svyid, String icdname) {
        this.svyid = svyid;
    }
    public Long getSvyid()
    {
        return svyid;
    }
    public void setCategoryid(Long categoryid)
    {
        this.categoryid = categoryid;
    }
    public Long getCategoryid()
    {
        return categoryid;
    }
    public void setSvycode(String svycode)
    {
        this.svycode = svycode;
    }
    public String getSvycode()
    {
        return svycode;
    }
    public void setSvyname(String svyname)
    {
        this.svyname = svyname;
    }
    public String getSvyname()
    {
        return svyname;
    }
    public void setDescription(String description)
    {
        this.description = description;
    }
    public String getDescription()
    {
        return description;
    }
    public void setIntroduce(String introduce)
    {
        this.introduce = introduce;
    }
    public String getIntroduce()
    {
        return introduce;
    }
    public void setSubmitprompt(String submitprompt)
    {
        this.submitprompt = submitprompt;
    }
    public String getSubmitprompt()
    {
        return submitprompt;
    }
    public void setTemplateid(Long templateid)
    {
        this.templateid = templateid;
    }
    public Long getTemplateid()
    {
        return templateid;
    }
    public void setVersion(BigDecimal version)
    {
        this.version = version;
    }
    public BigDecimal getVersion()
    {
        return version;
    }
    public void setCenterlibrarycode(String centerlibrarycode)
    {
        this.centerlibrarycode = centerlibrarycode;
    }
    public String getCenterlibrarycode()
    {
        return centerlibrarycode;
    }
    public void setCenterlibraryid(Long centerlibraryid)
    {
        this.centerlibraryid = centerlibraryid;
    }
    public Long getCenterlibraryid()
    {
        return centerlibraryid;
    }
    public void setIslocal(Long islocal)
    {
        this.islocal = islocal;
    }
    public Long getIslocal()
    {
        return islocal;
    }
    public void setIsenable(Long isenable)
    {
        this.isenable = isenable;
    }
    public Long getIsenable()
    {
        return isenable;
    }
    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;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("svyid", getSvyid())
            .append("categoryid", getCategoryid())
            .append("svycode", getSvycode())
            .append("svyname", getSvyname())
            .append("description", getDescription())
            .append("introduce", getIntroduce())
            .append("submitprompt", getSubmitprompt())
            .append("templateid", getTemplateid())
            .append("version", getVersion())
            .append("centerlibrarycode", getCenterlibrarycode())
            .append("centerlibraryid", getCenterlibraryid())
            .append("islocal", getIslocal())
            .append("isenable", getIsenable())
            .append("orgid", getOrgid())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("isupload", getIsupload())
            .append("uploadTime", getUploadTime())
            .toString();
        this.icdname = icdname;
    }
}
smartor/src/main/java/com/smartor/domain/SvyLibTitleReq.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
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.math.BigDecimal;
import java.util.Date;
/**
 * é—®å·è¯·æ±‚ svy_lib_title
 *
 * @author ruoyi
 * @date 2023-03-02
 */
@Data
@ApiModel(value = "SvyLibTitleReq", description = "问卷请求")
public class SvyLibTitleReq {
    /**
     * é—®å·åˆ†ç±»ID
     */
    @ApiModelProperty(value = "问卷分类ID")
    private Long categoryid;
    /**
     * é—®å·åç§°
     */
    @ApiModelProperty(value = "问卷名称")
    private String svyname;
    /**
     * é€‚用疾病
     */
    @ApiModelProperty(value = "适用疾病")
    private String description;
}
smartor/src/main/java/com/smartor/mapper/SvyLibTitleMapper.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.smartor.domain.SvyLibTitle;
import com.smartor.domain.SvyLibTitleReq;
/**
 * é—®å·Mapper接口
@@ -25,7 +26,7 @@
     * @param svyLibTitle é—®å·
     * @return é—®å·é›†åˆ
     */
    public List<SvyLibTitle> selectSvyLibTitleList(SvyLibTitle svyLibTitle);
    public List<SvyLibTitle> selectSvyLibTitleList(SvyLibTitleReq svyLibTitleReq);
    /**
     * æ–°å¢žé—®å·
smartor/src/main/java/com/smartor/service/ISvyLibTitleService.java
@@ -1,19 +1,20 @@
package com.smartor.service;
import java.util.List;
import com.smartor.domain.SvyLibTitle;
import com.smartor.domain.SvyLibTitleReq;
/**
 * é—®å·Service接口
 *
 *
 * @author ruoyi
 * @date 2023-03-02
 */
public interface ISvyLibTitleService
{
public interface ISvyLibTitleService {
    /**
     * æŸ¥è¯¢é—®å·
     *
     *
     * @param svyid é—®å·ä¸»é”®
     * @return é—®å·
     */
@@ -21,15 +22,15 @@
    /**
     * æŸ¥è¯¢é—®å·åˆ—表
     *
     * @param svyLibTitle é—®å·
     *
     * @param svyLibTitleReq é—®å·
     * @return é—®å·é›†åˆ
     */
    public List<SvyLibTitle> selectSvyLibTitleList(SvyLibTitle svyLibTitle);
    public List<SvyLibTitle> selectSvyLibTitleList(SvyLibTitleReq svyLibTitleReq);
    /**
     * æ–°å¢žé—®å·
     *
     *
     * @param svyLibTitle é—®å·
     * @return ç»“æžœ
     */
@@ -37,7 +38,7 @@
    /**
     * ä¿®æ”¹é—®å·
     *
     *
     * @param svyLibTitle é—®å·
     * @return ç»“æžœ
     */
@@ -45,7 +46,7 @@
    /**
     * æ‰¹é‡åˆ é™¤é—®å·
     *
     *
     * @param svyids éœ€è¦åˆ é™¤çš„问卷主键集合
     * @return ç»“æžœ
     */
@@ -53,7 +54,7 @@
    /**
     * åˆ é™¤é—®å·ä¿¡æ¯
     *
     *
     * @param svyid é—®å·ä¸»é”®
     * @return ç»“æžœ
     */
smartor/src/main/java/com/smartor/service/impl/SvyLibTitleServiceImpl.java
@@ -1,7 +1,13 @@
package com.smartor.service.impl;
import java.util.List;
import java.util.stream.Collectors;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.smartor.domain.SvyLibTitleReq;
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.mapper.SvyLibTitleMapper;
@@ -10,87 +16,96 @@
/**
 * é—®å·Service业务层处理
 *
 *
 * @author ruoyi
 * @date 2023-03-02
 */
@Service
public class SvyLibTitleServiceImpl implements ISvyLibTitleService
{
public class SvyLibTitleServiceImpl implements ISvyLibTitleService {
    @Autowired
    private SvyLibTitleMapper svyLibTitleMapper;
    /**
     * æŸ¥è¯¢é—®å·
     *
     *
     * @param svyid é—®å·ä¸»é”®
     * @return é—®å·
     */
    @Override
    public SvyLibTitle selectSvyLibTitleBySvyid(Long svyid)
    {
    public SvyLibTitle selectSvyLibTitleBySvyid(Long svyid) {
        return svyLibTitleMapper.selectSvyLibTitleBySvyid(svyid);
    }
    /**
     * æŸ¥è¯¢é—®å·åˆ—表
     *
     * @param svyLibTitle é—®å·
     *
     * @param svyLibTitleReq é—®å·
     * @return é—®å·
     */
    @Override
    public List<SvyLibTitle> selectSvyLibTitleList(SvyLibTitle svyLibTitle)
    {
        return svyLibTitleMapper.selectSvyLibTitleList(svyLibTitle);
    public List<SvyLibTitle> selectSvyLibTitleList(SvyLibTitleReq svyLibTitleReq) {
        List<SvyLibTitle> svyLibTitles = svyLibTitleMapper.selectSvyLibTitleList(svyLibTitleReq);
        //先将相同的id的icdname,整理到一块
        List<SvyLibTitle> libTitles = svyLibTitles.stream().collect(Collectors.groupingBy(SvyLibTitle::getSvyid, Collectors.mapping(SvyLibTitle::getIcdname, Collectors.joining(", ")))).entrySet().stream().map(entry -> new SvyLibTitle(entry.getKey(), entry.getValue())).collect(Collectors.toList());
        //临时变量,用来保存疾病名称
        String icdname = null;
        for (int i = 0; i < libTitles.size(); i++) {
            for (int j = 0; j < svyLibTitles.size(); j++) {
                if (ObjectUtils.isNotEmpty(libTitles.get(i).getSvyid()) && libTitles.get(i).getSvyid() == svyLibTitles.get(j).getSvyid()) {
                    icdname = libTitles.get(i).getIcdname();
                    // å°†åŽŸæ•°æ®æ‹·è´åˆ°æ•´ç†çš„å¥½çš„å¯¹è±¡ä¸Š
                    BeanUtils.copyProperties(svyLibTitles.get(j), libTitles.get(i));
                    //再将整理好的“疾病名称”替换
                    libTitles.get(i).setIcdname(icdname);
                }
            }
        }
        return libTitles;
    }
    /**
     * æ–°å¢žé—®å·
     *
     *
     * @param svyLibTitle é—®å·
     * @return ç»“æžœ
     */
    @Override
    public int insertSvyLibTitle(SvyLibTitle svyLibTitle)
    {
    public int insertSvyLibTitle(SvyLibTitle svyLibTitle) {
        svyLibTitle.setCreateTime(DateUtils.getNowDate());
        return svyLibTitleMapper.insertSvyLibTitle(svyLibTitle);
    }
    /**
     * ä¿®æ”¹é—®å·
     *
     *
     * @param svyLibTitle é—®å·
     * @return ç»“æžœ
     */
    @Override
    public int updateSvyLibTitle(SvyLibTitle svyLibTitle)
    {
    public int updateSvyLibTitle(SvyLibTitle svyLibTitle) {
        svyLibTitle.setUpdateTime(DateUtils.getNowDate());
        return svyLibTitleMapper.updateSvyLibTitle(svyLibTitle);
    }
    /**
     * æ‰¹é‡åˆ é™¤é—®å·
     *
     *
     * @param svyids éœ€è¦åˆ é™¤çš„问卷主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteSvyLibTitleBySvyids(Long[] svyids)
    {
    public int deleteSvyLibTitleBySvyids(Long[] svyids) {
        return svyLibTitleMapper.deleteSvyLibTitleBySvyids(svyids);
    }
    /**
     * åˆ é™¤é—®å·ä¿¡æ¯
     *
     *
     * @param svyid é—®å·ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteSvyLibTitleBySvyid(Long svyid)
    {
    public int deleteSvyLibTitleBySvyid(Long svyid) {
        return svyLibTitleMapper.deleteSvyLibTitleBySvyid(svyid);
    }
}
smartor/src/main/resources/mapper/smartor/SvyLibTitleMapper.xml
@@ -1,64 +1,79 @@
<?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.SvyLibTitleMapper">
    <resultMap type="SvyLibTitle" id="SvyLibTitleResult">
        <result property="svyid"    column="svyid"    />
        <result property="categoryid"    column="categoryid"    />
        <result property="svycode"    column="svycode"    />
        <result property="svyname"    column="svyname"    />
        <result property="description"    column="description"    />
        <result property="introduce"    column="introduce"    />
        <result property="submitprompt"    column="submitprompt"    />
        <result property="templateid"    column="templateid"    />
        <result property="version"    column="version"    />
        <result property="centerlibrarycode"    column="centerlibrarycode"    />
        <result property="centerlibraryid"    column="centerlibraryid"    />
        <result property="islocal"    column="islocal"    />
        <result property="isenable"    column="isenable"    />
        <result property="orgid"    column="orgid"    />
        <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 type="com.smartor.domain.SvyLibTitle" id="SvyLibTitleResult">
        <result property="svyid" column="svyid"/>
        <result property="categoryid" column="categoryid"/>
        <result property="svycode" column="svycode"/>
        <result property="svyname" column="svyname"/>
        <result property="description" column="description"/>
        <result property="introduce" column="introduce"/>
        <result property="submitprompt" column="submitprompt"/>
        <result property="templateid" column="templateid"/>
        <result property="version" column="version"/>
        <result property="centerlibrarycode" column="centerlibrarycode"/>
        <result property="centerlibraryid" column="centerlibraryid"/>
        <result property="islocal" column="islocal"/>
        <result property="isenable" column="isenable"/>
        <result property="orgid" column="orgid"/>
        <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="selectSvyLibTitleVo">
        select svyid, categoryid, svycode, svyname, description, introduce, submitprompt, templateid, version, centerlibrarycode, centerlibraryid, islocal, isenable, orgid, del_flag, create_by, create_time, update_by, update_time, isupload, upload_time from svy_lib_title
        select svyid,
               categoryid,
               svycode,
               svyname,
               description,
               introduce,
               submitprompt,
               templateid,
               version,
               centerlibrarycode,
               centerlibraryid,
               islocal,
               isenable,
               orgid,
               del_flag,
               create_by,
               create_time,
               update_by,
               update_time,
               isupload,
               upload_time
        from svy_lib_title
    </sql>
    <select id="selectSvyLibTitleList" parameterType="SvyLibTitle" resultMap="SvyLibTitleResult">
        <include refid="selectSvyLibTitleVo"/>
        <where>
            <if test="categoryid != null "> and categoryid = #{categoryid}</if>
            <if test="svycode != null  and svycode != ''"> and svycode = #{svycode}</if>
            <if test="svyname != null  and svyname != ''"> and svyname like concat('%', #{svyname}, '%')</if>
            <if test="description != null  and description != ''"> and description = #{description}</if>
            <if test="introduce != null  and introduce != ''"> and introduce = #{introduce}</if>
            <if test="submitprompt != null  and submitprompt != ''"> and submitprompt = #{submitprompt}</if>
            <if test="templateid != null "> and templateid = #{templateid}</if>
            <if test="version != null "> and version = #{version}</if>
            <if test="centerlibrarycode != null  and centerlibrarycode != ''"> and centerlibrarycode = #{centerlibrarycode}</if>
            <if test="centerlibraryid != null "> and centerlibraryid = #{centerlibraryid}</if>
            <if test="islocal != null "> and islocal = #{islocal}</if>
            <if test="isenable != null "> and isenable = #{isenable}</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>
    <select id="selectSvyLibTitleList" parameterType="com.smartor.domain.SvyLibTitleReq" resultMap="SvyLibTitleResult">
        select a.svyid, a.categoryid, a.svycode, a.svyname, a.description, a.introduce,a.submitprompt, a.templateid,
        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,c.icdname from svy_lib_title
        a,icd10_association b,icd10 c
        <where>
            a.svyid=b.SVYID and b.ICD10CODE=c.icdcode
            <if test="categoryid != null ">and a.categoryid = #{categoryid}</if>
            <if test="svyname != null  and svyname != ''">and a.svyname like concat('%', #{svyname}, '%')</if>
            <if test="description != null  and description != ''">and a.icdname like concat('%', #{description}, '%')
            </if>
        </where>
    </select>
    <select id="selectSvyLibTitleBySvyid" parameterType="Long" resultMap="SvyLibTitleResult">
        <include refid="selectSvyLibTitleVo"/>
        where svyid = #{svyid}
    </select>
    <insert id="insertSvyLibTitle" parameterType="SvyLibTitle" useGeneratedKeys="true" keyProperty="svyid">
    <insert id="insertSvyLibTitle" parameterType="com.smartor.domain.SvyLibTitle" useGeneratedKeys="true"
            keyProperty="svyid">
        insert into svy_lib_title
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="categoryid != null">categoryid,</if>
@@ -81,7 +96,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="categoryid != null">#{categoryid},</if>
            <if test="svycode != null">#{svycode},</if>
@@ -103,10 +118,10 @@
            <if test="updateTime != null">#{updateTime},</if>
            <if test="isupload != null">#{isupload},</if>
            <if test="uploadTime != null">#{uploadTime},</if>
         </trim>
        </trim>
    </insert>
    <update id="updateSvyLibTitle" parameterType="SvyLibTitle">
    <update id="updateSvyLibTitle" parameterType="com.smartor.domain.SvyLibTitle">
        update svy_lib_title
        <trim prefix="SET" suffixOverrides=",">
            <if test="categoryid != null">categoryid = #{categoryid},</if>
@@ -134,11 +149,13 @@
    </update>
    <delete id="deleteSvyLibTitleBySvyid" parameterType="Long">
        delete from svy_lib_title where svyid = #{svyid}
        delete
        from svy_lib_title
        where svyid = #{svyid}
    </delete>
    <delete id="deleteSvyLibTitleBySvyids" parameterType="String">
        delete from svy_lib_title where svyid in
        delete from svy_lib_title where svyid in
        <foreach item="svyid" collection="array" open="(" separator="," close=")">
            #{svyid}
        </foreach>