fix: 健康档案管理,新增标签管理、常见疾病功能。
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.health.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.health.domain.HealthDiseases;
|
||||
import com.ruoyi.health.domain.vo.HealthDiseasesVo;
|
||||
import com.ruoyi.health.domain.dto.HealthDiseasesDto;
|
||||
import com.ruoyi.health.service.IHealthDiseasesService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 常见疾病治疗Controller
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@Api(tags=" 常见疾病治疗")
|
||||
@RestController
|
||||
@RequestMapping("/HealthDiseases")
|
||||
public class HealthDiseasesController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private IHealthDiseasesService healthDiseasesService;
|
||||
|
||||
/**
|
||||
* 查询常见疾病治疗列表
|
||||
*/
|
||||
@ApiOperation(value="查询常见疾病治疗列表",response = HealthDiseasesVo.class)
|
||||
@RequiresPermissions("health:HealthDiseases:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HealthDiseasesDto healthDiseasesDto)
|
||||
{
|
||||
startPage();
|
||||
List<HealthDiseasesVo> list = healthDiseasesService.selectHealthDiseasesList(healthDiseasesDto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出常见疾病治疗列表
|
||||
*/
|
||||
@ApiOperation(value="导出常见疾病治疗列表")
|
||||
@RequiresPermissions("health:HealthDiseases:export")
|
||||
@Log(title = "常见疾病治疗", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HealthDiseasesDto healthDiseasesDto)
|
||||
{
|
||||
List<HealthDiseasesVo> list = healthDiseasesService.selectHealthDiseasesList(healthDiseasesDto);
|
||||
ExcelUtil<HealthDiseasesVo> util = new ExcelUtil<HealthDiseasesVo>(HealthDiseasesVo.class);
|
||||
util.exportExcel(response, list, "常见疾病治疗数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取常见疾病治疗详细信息
|
||||
*/
|
||||
@ApiOperation(value="获取常见疾病治疗详细信息")
|
||||
@RequiresPermissions("health:HealthDiseases:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(healthDiseasesService.selectHealthDiseasesById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增常见疾病治疗
|
||||
*/
|
||||
@ApiOperation(value="新增常见疾病治疗")
|
||||
@RequiresPermissions("health:HealthDiseases:add")
|
||||
@Log(title = "常见疾病治疗", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HealthDiseases healthDiseases)
|
||||
{
|
||||
return toAjax(healthDiseasesService.insertHealthDiseases(healthDiseases));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改常见疾病治疗
|
||||
*/
|
||||
@ApiOperation(value="修改常见疾病治疗")
|
||||
@RequiresPermissions("health:HealthDiseases:edit")
|
||||
@Log(title = "常见疾病治疗", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HealthDiseases healthDiseases)
|
||||
{
|
||||
return toAjax(healthDiseasesService.updateHealthDiseases(healthDiseases));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除常见疾病治疗
|
||||
*/
|
||||
@ApiOperation(value="删除常见疾病治疗")
|
||||
@RequiresPermissions("health:HealthDiseases:remove")
|
||||
@Log(title = "常见疾病治疗", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(healthDiseasesService.deleteHealthDiseasesByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.health.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.health.domain.HealthMedicineTags;
|
||||
import com.ruoyi.health.domain.vo.HealthMedicineTagsVo;
|
||||
import com.ruoyi.health.domain.dto.HealthMedicineTagsDto;
|
||||
import com.ruoyi.health.service.IHealthMedicineTagsService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 标签管理Controller
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@Api(tags=" 标签管理")
|
||||
@RestController
|
||||
@RequestMapping("/healthTags")
|
||||
public class HealthMedicineTagsController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private IHealthMedicineTagsService healthMedicineTagsService;
|
||||
|
||||
/**
|
||||
* 查询标签管理列表
|
||||
*/
|
||||
@ApiOperation(value="查询标签管理列表",response = HealthMedicineTagsVo.class)
|
||||
@RequiresPermissions("health:healthTags:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HealthMedicineTagsDto healthMedicineTagsDto)
|
||||
{
|
||||
startPage();
|
||||
List<HealthMedicineTagsVo> list = healthMedicineTagsService.selectHealthMedicineTagsList(healthMedicineTagsDto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出标签管理列表
|
||||
*/
|
||||
@ApiOperation(value="导出标签管理列表")
|
||||
@RequiresPermissions("health:healthTags:export")
|
||||
@Log(title = "标签管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HealthMedicineTagsDto healthMedicineTagsDto)
|
||||
{
|
||||
List<HealthMedicineTagsVo> list = healthMedicineTagsService.selectHealthMedicineTagsList(healthMedicineTagsDto);
|
||||
ExcelUtil<HealthMedicineTagsVo> util = new ExcelUtil<HealthMedicineTagsVo>(HealthMedicineTagsVo.class);
|
||||
util.exportExcel(response, list, "标签管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取标签管理详细信息
|
||||
*/
|
||||
@ApiOperation(value="获取标签管理详细信息")
|
||||
@RequiresPermissions("health:healthTags:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(healthMedicineTagsService.selectHealthMedicineTagsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增标签管理
|
||||
*/
|
||||
@ApiOperation(value="新增标签管理")
|
||||
@RequiresPermissions("health:healthTags:add")
|
||||
@Log(title = "标签管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HealthMedicineTags healthMedicineTags)
|
||||
{
|
||||
return toAjax(healthMedicineTagsService.insertHealthMedicineTags(healthMedicineTags));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改标签管理
|
||||
*/
|
||||
@ApiOperation(value="修改标签管理")
|
||||
@RequiresPermissions("health:healthTags:edit")
|
||||
@Log(title = "标签管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HealthMedicineTags healthMedicineTags)
|
||||
{
|
||||
return toAjax(healthMedicineTagsService.updateHealthMedicineTags(healthMedicineTags));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除标签管理
|
||||
*/
|
||||
@ApiOperation(value="删除标签管理")
|
||||
@RequiresPermissions("health:healthTags:remove")
|
||||
@Log(title = "标签管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(healthMedicineTagsService.deleteHealthMedicineTagsByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.health.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.health.domain.HealthMedicineTagsRel;
|
||||
import com.ruoyi.health.domain.vo.HealthMedicineTagsRelVo;
|
||||
import com.ruoyi.health.domain.dto.HealthMedicineTagsRelDto;
|
||||
import com.ruoyi.health.service.IHealthMedicineTagsRelService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 药品标签关系Controller
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@Api(tags=" 药品标签关系")
|
||||
@RestController
|
||||
@RequestMapping("/MedicineTagsRel")
|
||||
public class HealthMedicineTagsRelController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private IHealthMedicineTagsRelService healthMedicineTagsRelService;
|
||||
|
||||
/**
|
||||
* 查询药品标签关系列表
|
||||
*/
|
||||
@ApiOperation(value="查询药品标签关系列表",response = HealthMedicineTagsRelVo.class)
|
||||
@RequiresPermissions("health:MedicineTagsRel:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HealthMedicineTagsRelDto healthMedicineTagsRelDto)
|
||||
{
|
||||
startPage();
|
||||
List<HealthMedicineTagsRelVo> list = healthMedicineTagsRelService.selectHealthMedicineTagsRelList(healthMedicineTagsRelDto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出药品标签关系列表
|
||||
*/
|
||||
@ApiOperation(value="导出药品标签关系列表")
|
||||
@RequiresPermissions("health:MedicineTagsRel:export")
|
||||
@Log(title = "药品标签关系", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HealthMedicineTagsRelDto healthMedicineTagsRelDto)
|
||||
{
|
||||
List<HealthMedicineTagsRelVo> list = healthMedicineTagsRelService.selectHealthMedicineTagsRelList(healthMedicineTagsRelDto);
|
||||
ExcelUtil<HealthMedicineTagsRelVo> util = new ExcelUtil<HealthMedicineTagsRelVo>(HealthMedicineTagsRelVo.class);
|
||||
util.exportExcel(response, list, "药品标签关系数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品标签关系详细信息
|
||||
*/
|
||||
@ApiOperation(value="获取药品标签关系详细信息")
|
||||
@RequiresPermissions("health:MedicineTagsRel:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(healthMedicineTagsRelService.selectHealthMedicineTagsRelById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品标签关系
|
||||
*/
|
||||
@ApiOperation(value="新增药品标签关系")
|
||||
@RequiresPermissions("health:MedicineTagsRel:add")
|
||||
@Log(title = "药品标签关系", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HealthMedicineTagsRel healthMedicineTagsRel)
|
||||
{
|
||||
return toAjax(healthMedicineTagsRelService.insertHealthMedicineTagsRel(healthMedicineTagsRel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品标签关系
|
||||
*/
|
||||
@ApiOperation(value="修改药品标签关系")
|
||||
@RequiresPermissions("health:MedicineTagsRel:edit")
|
||||
@Log(title = "药品标签关系", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HealthMedicineTagsRel healthMedicineTagsRel)
|
||||
{
|
||||
return toAjax(healthMedicineTagsRelService.updateHealthMedicineTagsRel(healthMedicineTagsRel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品标签关系
|
||||
*/
|
||||
@ApiOperation(value="删除药品标签关系")
|
||||
@RequiresPermissions("health:MedicineTagsRel:remove")
|
||||
@Log(title = "药品标签关系", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(healthMedicineTagsRelService.deleteHealthMedicineTagsRelByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.ruoyi.health.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* 常见疾病治疗对象 health_diseases
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@ApiModel("常见疾病治疗对象")
|
||||
@Data
|
||||
public class HealthDiseases extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
@ApiModelProperty(value="名称)")
|
||||
@NotNull(message="名称不能为空")
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 类型 */
|
||||
@ApiModelProperty(value="类型)")
|
||||
@NotNull(message="类型不能为空")
|
||||
@Excel(name = "类型")
|
||||
private String type;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 症状 */
|
||||
@ApiModelProperty(value="症状)")
|
||||
@NotNull(message="症状不能为空")
|
||||
@Excel(name = "症状")
|
||||
private String symptom;
|
||||
|
||||
/** 检查项目 */
|
||||
@ApiModelProperty(value="检查项目")
|
||||
@Excel(name = "检查项目")
|
||||
private String inspectionItems;
|
||||
|
||||
/** 药物治疗 */
|
||||
@ApiModelProperty(value="药物治疗")
|
||||
@Excel(name = "药物治疗")
|
||||
private String medicalTreatment;
|
||||
|
||||
/** 中医治疗 */
|
||||
private String tcmTreatment;
|
||||
|
||||
/** 手术治疗 */
|
||||
private String surgicalTreatment;
|
||||
|
||||
/** 物理治疗 */
|
||||
private String physicalTreatment;
|
||||
|
||||
/** 其他方式 */
|
||||
private String otherTreatment;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("type", getType())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("remark", getRemark())
|
||||
.append("symptom", getSymptom())
|
||||
.append("inspectionItems", getInspectionItems())
|
||||
.append("medicalTreatment", getMedicalTreatment())
|
||||
.append("tcmTreatment", getTcmTreatment())
|
||||
.append("surgicalTreatment", getSurgicalTreatment())
|
||||
.append("physicalTreatment", getPhysicalTreatment())
|
||||
.append("otherTreatment", getOtherTreatment())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.ruoyi.health.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* 标签管理对象 health_medicine_tags
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@ApiModel("标签管理对象")
|
||||
@Data
|
||||
public class HealthMedicineTags extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
@ApiModelProperty(value="名称)")
|
||||
@NotNull(message="名称不能为空")
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 类型,1药品标签 */
|
||||
@ApiModelProperty(value="类型,1药品标签)")
|
||||
@NotNull(message="类型,1药品标签不能为空")
|
||||
@Excel(name = "类型,1药品标签")
|
||||
private String type;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 编码 */
|
||||
@ApiModelProperty(value="编码)")
|
||||
@NotNull(message="编码不能为空")
|
||||
@Excel(name = "编码")
|
||||
private String code;
|
||||
|
||||
/** 属性 */
|
||||
@ApiModelProperty(value="属性")
|
||||
@Excel(name = "属性")
|
||||
private String atttibute;
|
||||
|
||||
/** 额外属性 */
|
||||
@ApiModelProperty(value="额外属性")
|
||||
@Excel(name = "额外属性")
|
||||
private String atttibuteExtra;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("type", getType())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("remark", getRemark())
|
||||
.append("code", getCode())
|
||||
.append("atttibute", getAtttibute())
|
||||
.append("atttibuteExtra", getAtttibuteExtra())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.ruoyi.health.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* 药品标签关系对象 health_medicine_tags_rel
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@ApiModel("药品标签关系对象")
|
||||
@Data
|
||||
public class HealthMedicineTagsRel extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 标签id */
|
||||
@ApiModelProperty(value="标签id")
|
||||
@Excel(name = "标签id")
|
||||
private Long tagId;
|
||||
|
||||
/** 药品id */
|
||||
@ApiModelProperty(value="药品id")
|
||||
@Excel(name = "药品id")
|
||||
private Long medicineId;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tagId", getTagId())
|
||||
.append("medicineId", getMedicineId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.ruoyi.health.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* 常见疾病治疗Dto对象 health_diseases
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@ApiModel("常见疾病治疗Dto对象")
|
||||
@Data
|
||||
public class HealthDiseasesDto implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 名称 */
|
||||
@ApiModelProperty(value="名称")
|
||||
private String name;
|
||||
|
||||
/** 类型 */
|
||||
@ApiModelProperty(value="类型")
|
||||
private String type;
|
||||
|
||||
/** 症状 */
|
||||
@ApiModelProperty(value="症状")
|
||||
private String symptom;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.ruoyi.health.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* 标签管理Dto对象 health_medicine_tags
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@ApiModel("标签管理Dto对象")
|
||||
@Data
|
||||
public class HealthMedicineTagsDto implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 名称 */
|
||||
@ApiModelProperty(value="名称")
|
||||
private String name;
|
||||
|
||||
/** 类型,1药品标签 */
|
||||
@ApiModelProperty(value="类型,1药品标签")
|
||||
private String type;
|
||||
|
||||
/** 编码 */
|
||||
@ApiModelProperty(value="编码")
|
||||
private String code;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.health.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* 药品标签关系Dto对象 health_medicine_tags_rel
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@ApiModel("药品标签关系Dto对象")
|
||||
@Data
|
||||
public class HealthMedicineTagsRelDto implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 标签id */
|
||||
@ApiModelProperty(value="标签id")
|
||||
private Long tagId;
|
||||
|
||||
/** 药品id */
|
||||
@ApiModelProperty(value="药品id")
|
||||
private Long medicineId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.health.domain.vo;
|
||||
|
||||
import com.ruoyi.health.domain.HealthDiseases;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
/**
|
||||
* 常见疾病治疗Vo对象 health_diseases
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@ApiModel("常见疾病治疗Vo对象")
|
||||
@Data
|
||||
public class HealthDiseasesVo extends HealthDiseases
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.health.domain.vo;
|
||||
|
||||
import com.ruoyi.health.domain.HealthMedicineTagsRel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
/**
|
||||
* 药品标签关系Vo对象 health_medicine_tags_rel
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@ApiModel("药品标签关系Vo对象")
|
||||
@Data
|
||||
public class HealthMedicineTagsRelVo extends HealthMedicineTagsRel
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.health.domain.vo;
|
||||
|
||||
import com.ruoyi.health.domain.HealthMedicineTags;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
/**
|
||||
* 标签管理Vo对象 health_medicine_tags
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@ApiModel("标签管理Vo对象")
|
||||
@Data
|
||||
public class HealthMedicineTagsVo extends HealthMedicineTags
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.ruoyi.health.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.health.domain.HealthDiseases;
|
||||
import com.ruoyi.health.domain.dto.HealthDiseasesDto;
|
||||
import com.ruoyi.health.domain.vo.HealthDiseasesVo;
|
||||
|
||||
/**
|
||||
* 常见疾病治疗Mapper接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
public interface HealthDiseasesMapper
|
||||
{
|
||||
/**
|
||||
* 查询常见疾病治疗
|
||||
*
|
||||
* @param id 常见疾病治疗主键
|
||||
* @return 常见疾病治疗
|
||||
*/
|
||||
public HealthDiseasesVo selectHealthDiseasesById(Long id);
|
||||
|
||||
/**
|
||||
* 查询常见疾病治疗列表
|
||||
*
|
||||
* @param healthDiseasesDto 常见疾病治疗
|
||||
* @return 常见疾病治疗集合
|
||||
*/
|
||||
public List<HealthDiseasesVo> selectHealthDiseasesList(HealthDiseasesDto healthDiseasesDto);
|
||||
|
||||
/**
|
||||
* 新增常见疾病治疗
|
||||
*
|
||||
* @param healthDiseases 常见疾病治疗
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealthDiseases(HealthDiseases healthDiseases);
|
||||
|
||||
/**
|
||||
* 修改常见疾病治疗
|
||||
*
|
||||
* @param healthDiseases 常见疾病治疗
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHealthDiseases(HealthDiseases healthDiseases);
|
||||
|
||||
/**
|
||||
* 删除常见疾病治疗
|
||||
*
|
||||
* @param id 常见疾病治疗主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthDiseasesById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除常见疾病治疗
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthDiseasesByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 逻辑删除常见疾病治疗
|
||||
*
|
||||
* @param id 常见疾病治疗主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeHealthDiseasesById(Long id);
|
||||
|
||||
/**
|
||||
* 批量逻辑删除常见疾病治疗
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeHealthDiseasesByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.ruoyi.health.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.health.domain.HealthMedicineTags;
|
||||
import com.ruoyi.health.domain.dto.HealthMedicineTagsDto;
|
||||
import com.ruoyi.health.domain.vo.HealthMedicineTagsVo;
|
||||
|
||||
/**
|
||||
* 标签管理Mapper接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
public interface HealthMedicineTagsMapper
|
||||
{
|
||||
/**
|
||||
* 查询标签管理
|
||||
*
|
||||
* @param id 标签管理主键
|
||||
* @return 标签管理
|
||||
*/
|
||||
public HealthMedicineTagsVo selectHealthMedicineTagsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询标签管理列表
|
||||
*
|
||||
* @param healthMedicineTagsDto 标签管理
|
||||
* @return 标签管理集合
|
||||
*/
|
||||
public List<HealthMedicineTagsVo> selectHealthMedicineTagsList(HealthMedicineTagsDto healthMedicineTagsDto);
|
||||
|
||||
/**
|
||||
* 新增标签管理
|
||||
*
|
||||
* @param healthMedicineTags 标签管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealthMedicineTags(HealthMedicineTags healthMedicineTags);
|
||||
|
||||
/**
|
||||
* 修改标签管理
|
||||
*
|
||||
* @param healthMedicineTags 标签管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHealthMedicineTags(HealthMedicineTags healthMedicineTags);
|
||||
|
||||
/**
|
||||
* 删除标签管理
|
||||
*
|
||||
* @param id 标签管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthMedicineTagsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除标签管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthMedicineTagsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 逻辑删除标签管理
|
||||
*
|
||||
* @param id 标签管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeHealthMedicineTagsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量逻辑删除标签管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeHealthMedicineTagsByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.ruoyi.health.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.health.domain.HealthMedicineTagsRel;
|
||||
import com.ruoyi.health.domain.dto.HealthMedicineTagsRelDto;
|
||||
import com.ruoyi.health.domain.vo.HealthMedicineTagsRelVo;
|
||||
|
||||
/**
|
||||
* 药品标签关系Mapper接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
public interface HealthMedicineTagsRelMapper
|
||||
{
|
||||
/**
|
||||
* 查询药品标签关系
|
||||
*
|
||||
* @param id 药品标签关系主键
|
||||
* @return 药品标签关系
|
||||
*/
|
||||
public HealthMedicineTagsRelVo selectHealthMedicineTagsRelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品标签关系列表
|
||||
*
|
||||
* @param healthMedicineTagsRelDto 药品标签关系
|
||||
* @return 药品标签关系集合
|
||||
*/
|
||||
public List<HealthMedicineTagsRelVo> selectHealthMedicineTagsRelList(HealthMedicineTagsRelDto healthMedicineTagsRelDto);
|
||||
|
||||
/**
|
||||
* 新增药品标签关系
|
||||
*
|
||||
* @param healthMedicineTagsRel 药品标签关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealthMedicineTagsRel(HealthMedicineTagsRel healthMedicineTagsRel);
|
||||
|
||||
/**
|
||||
* 修改药品标签关系
|
||||
*
|
||||
* @param healthMedicineTagsRel 药品标签关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHealthMedicineTagsRel(HealthMedicineTagsRel healthMedicineTagsRel);
|
||||
|
||||
/**
|
||||
* 删除药品标签关系
|
||||
*
|
||||
* @param id 药品标签关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthMedicineTagsRelById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除药品标签关系
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthMedicineTagsRelByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 逻辑删除药品标签关系
|
||||
*
|
||||
* @param id 药品标签关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeHealthMedicineTagsRelById(Long id);
|
||||
|
||||
/**
|
||||
* 批量逻辑删除药品标签关系
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeHealthMedicineTagsRelByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.health.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.health.domain.HealthDiseases;
|
||||
import com.ruoyi.health.domain.dto.HealthDiseasesDto;
|
||||
import com.ruoyi.health.domain.vo.HealthDiseasesVo;
|
||||
|
||||
/**
|
||||
* 常见疾病治疗Service接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
public interface IHealthDiseasesService
|
||||
{
|
||||
/**
|
||||
* 查询常见疾病治疗
|
||||
*
|
||||
* @param id 常见疾病治疗主键
|
||||
* @return 常见疾病治疗
|
||||
*/
|
||||
public HealthDiseasesVo selectHealthDiseasesById(Long id);
|
||||
|
||||
/**
|
||||
* 查询常见疾病治疗列表
|
||||
*
|
||||
* @param healthDiseasesDto 常见疾病治疗
|
||||
* @return 常见疾病治疗集合
|
||||
*/
|
||||
public List<HealthDiseasesVo> selectHealthDiseasesList(HealthDiseasesDto healthDiseasesDto);
|
||||
|
||||
/**
|
||||
* 新增常见疾病治疗
|
||||
*
|
||||
* @param healthDiseases 常见疾病治疗
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealthDiseases(HealthDiseases healthDiseases);
|
||||
|
||||
/**
|
||||
* 修改常见疾病治疗
|
||||
*
|
||||
* @param healthDiseases 常见疾病治疗
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHealthDiseases(HealthDiseases healthDiseases);
|
||||
|
||||
/**
|
||||
* 批量删除常见疾病治疗
|
||||
*
|
||||
* @param ids 需要删除的常见疾病治疗主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthDiseasesByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除常见疾病治疗信息
|
||||
*
|
||||
* @param id 常见疾病治疗主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthDiseasesById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.health.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.health.domain.HealthMedicineTagsRel;
|
||||
import com.ruoyi.health.domain.dto.HealthMedicineTagsRelDto;
|
||||
import com.ruoyi.health.domain.vo.HealthMedicineTagsRelVo;
|
||||
|
||||
/**
|
||||
* 药品标签关系Service接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
public interface IHealthMedicineTagsRelService
|
||||
{
|
||||
/**
|
||||
* 查询药品标签关系
|
||||
*
|
||||
* @param id 药品标签关系主键
|
||||
* @return 药品标签关系
|
||||
*/
|
||||
public HealthMedicineTagsRelVo selectHealthMedicineTagsRelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品标签关系列表
|
||||
*
|
||||
* @param healthMedicineTagsRelDto 药品标签关系
|
||||
* @return 药品标签关系集合
|
||||
*/
|
||||
public List<HealthMedicineTagsRelVo> selectHealthMedicineTagsRelList(HealthMedicineTagsRelDto healthMedicineTagsRelDto);
|
||||
|
||||
/**
|
||||
* 新增药品标签关系
|
||||
*
|
||||
* @param healthMedicineTagsRel 药品标签关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealthMedicineTagsRel(HealthMedicineTagsRel healthMedicineTagsRel);
|
||||
|
||||
/**
|
||||
* 修改药品标签关系
|
||||
*
|
||||
* @param healthMedicineTagsRel 药品标签关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHealthMedicineTagsRel(HealthMedicineTagsRel healthMedicineTagsRel);
|
||||
|
||||
/**
|
||||
* 批量删除药品标签关系
|
||||
*
|
||||
* @param ids 需要删除的药品标签关系主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthMedicineTagsRelByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除药品标签关系信息
|
||||
*
|
||||
* @param id 药品标签关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthMedicineTagsRelById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.health.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.health.domain.HealthMedicineTags;
|
||||
import com.ruoyi.health.domain.dto.HealthMedicineTagsDto;
|
||||
import com.ruoyi.health.domain.vo.HealthMedicineTagsVo;
|
||||
|
||||
/**
|
||||
* 标签管理Service接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
public interface IHealthMedicineTagsService
|
||||
{
|
||||
/**
|
||||
* 查询标签管理
|
||||
*
|
||||
* @param id 标签管理主键
|
||||
* @return 标签管理
|
||||
*/
|
||||
public HealthMedicineTagsVo selectHealthMedicineTagsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询标签管理列表
|
||||
*
|
||||
* @param healthMedicineTagsDto 标签管理
|
||||
* @return 标签管理集合
|
||||
*/
|
||||
public List<HealthMedicineTagsVo> selectHealthMedicineTagsList(HealthMedicineTagsDto healthMedicineTagsDto);
|
||||
|
||||
/**
|
||||
* 新增标签管理
|
||||
*
|
||||
* @param healthMedicineTags 标签管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealthMedicineTags(HealthMedicineTags healthMedicineTags);
|
||||
|
||||
/**
|
||||
* 修改标签管理
|
||||
*
|
||||
* @param healthMedicineTags 标签管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHealthMedicineTags(HealthMedicineTags healthMedicineTags);
|
||||
|
||||
/**
|
||||
* 批量删除标签管理
|
||||
*
|
||||
* @param ids 需要删除的标签管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthMedicineTagsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除标签管理信息
|
||||
*
|
||||
* @param id 标签管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthMedicineTagsById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.health.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.utils.IdWorker;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.health.domain.HealthDiseases;
|
||||
import com.ruoyi.health.domain.dto.HealthDiseasesDto;
|
||||
import com.ruoyi.health.domain.vo.HealthDiseasesVo;
|
||||
import com.ruoyi.health.mapper.HealthDiseasesMapper;
|
||||
import com.ruoyi.health.service.IHealthDiseasesService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 常见疾病治疗Service业务层处理
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@Service
|
||||
public class HealthDiseasesServiceImpl implements IHealthDiseasesService
|
||||
{
|
||||
@Resource
|
||||
private HealthDiseasesMapper healthDiseasesMapper;
|
||||
|
||||
/**
|
||||
* 查询常见疾病治疗
|
||||
*
|
||||
* @param id 常见疾病治疗主键
|
||||
* @return 常见疾病治疗
|
||||
*/
|
||||
@Override
|
||||
public HealthDiseasesVo selectHealthDiseasesById(Long id)
|
||||
{
|
||||
return healthDiseasesMapper.selectHealthDiseasesById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询常见疾病治疗列表
|
||||
*
|
||||
* @param healthDiseasesDto 常见疾病治疗
|
||||
* @return 常见疾病治疗
|
||||
*/
|
||||
@Override
|
||||
public List<HealthDiseasesVo> selectHealthDiseasesList(HealthDiseasesDto healthDiseasesDto)
|
||||
{
|
||||
return healthDiseasesMapper.selectHealthDiseasesList(healthDiseasesDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增常见疾病治疗
|
||||
*
|
||||
* @param healthDiseases 常见疾病治疗
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHealthDiseases(HealthDiseases healthDiseases)
|
||||
{
|
||||
healthDiseases.setCreateBy(SecurityUtils.getUsername());
|
||||
healthDiseases.setCreateTime(DateUtils.getNowDate());
|
||||
healthDiseases.setId(IdWorker.getId());
|
||||
return healthDiseasesMapper.insertHealthDiseases(healthDiseases);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改常见疾病治疗
|
||||
*
|
||||
* @param healthDiseases 常见疾病治疗
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHealthDiseases(HealthDiseases healthDiseases)
|
||||
{
|
||||
healthDiseases.setUpdateBy(SecurityUtils.getUsername());
|
||||
healthDiseases.setUpdateTime(DateUtils.getNowDate());
|
||||
return healthDiseasesMapper.updateHealthDiseases(healthDiseases);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除常见疾病治疗
|
||||
*
|
||||
* @param ids 需要删除的常见疾病治疗主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthDiseasesByIds(Long[] ids)
|
||||
{
|
||||
return healthDiseasesMapper.removeHealthDiseasesByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除常见疾病治疗信息
|
||||
*
|
||||
* @param id 常见疾病治疗主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthDiseasesById(Long id)
|
||||
{
|
||||
return healthDiseasesMapper.removeHealthDiseasesById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.health.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.utils.IdWorker;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.health.domain.HealthMedicineTagsRel;
|
||||
import com.ruoyi.health.domain.dto.HealthMedicineTagsRelDto;
|
||||
import com.ruoyi.health.domain.vo.HealthMedicineTagsRelVo;
|
||||
import com.ruoyi.health.mapper.HealthMedicineTagsRelMapper;
|
||||
import com.ruoyi.health.service.IHealthMedicineTagsRelService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品标签关系Service业务层处理
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@Service
|
||||
public class HealthMedicineTagsRelServiceImpl implements IHealthMedicineTagsRelService
|
||||
{
|
||||
@Resource
|
||||
private HealthMedicineTagsRelMapper healthMedicineTagsRelMapper;
|
||||
|
||||
/**
|
||||
* 查询药品标签关系
|
||||
*
|
||||
* @param id 药品标签关系主键
|
||||
* @return 药品标签关系
|
||||
*/
|
||||
@Override
|
||||
public HealthMedicineTagsRelVo selectHealthMedicineTagsRelById(Long id)
|
||||
{
|
||||
return healthMedicineTagsRelMapper.selectHealthMedicineTagsRelById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品标签关系列表
|
||||
*
|
||||
* @param healthMedicineTagsRelDto 药品标签关系
|
||||
* @return 药品标签关系
|
||||
*/
|
||||
@Override
|
||||
public List<HealthMedicineTagsRelVo> selectHealthMedicineTagsRelList(HealthMedicineTagsRelDto healthMedicineTagsRelDto)
|
||||
{
|
||||
return healthMedicineTagsRelMapper.selectHealthMedicineTagsRelList(healthMedicineTagsRelDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品标签关系
|
||||
*
|
||||
* @param healthMedicineTagsRel 药品标签关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHealthMedicineTagsRel(HealthMedicineTagsRel healthMedicineTagsRel)
|
||||
{
|
||||
healthMedicineTagsRel.setCreateBy(SecurityUtils.getUsername());
|
||||
healthMedicineTagsRel.setCreateTime(DateUtils.getNowDate());
|
||||
healthMedicineTagsRel.setId(IdWorker.getId());
|
||||
return healthMedicineTagsRelMapper.insertHealthMedicineTagsRel(healthMedicineTagsRel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品标签关系
|
||||
*
|
||||
* @param healthMedicineTagsRel 药品标签关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHealthMedicineTagsRel(HealthMedicineTagsRel healthMedicineTagsRel)
|
||||
{
|
||||
healthMedicineTagsRel.setUpdateBy(SecurityUtils.getUsername());
|
||||
healthMedicineTagsRel.setUpdateTime(DateUtils.getNowDate());
|
||||
return healthMedicineTagsRelMapper.updateHealthMedicineTagsRel(healthMedicineTagsRel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除药品标签关系
|
||||
*
|
||||
* @param ids 需要删除的药品标签关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthMedicineTagsRelByIds(Long[] ids)
|
||||
{
|
||||
return healthMedicineTagsRelMapper.removeHealthMedicineTagsRelByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品标签关系信息
|
||||
*
|
||||
* @param id 药品标签关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthMedicineTagsRelById(Long id)
|
||||
{
|
||||
return healthMedicineTagsRelMapper.removeHealthMedicineTagsRelById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.health.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.utils.IdWorker;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.health.domain.HealthMedicineTags;
|
||||
import com.ruoyi.health.domain.dto.HealthMedicineTagsDto;
|
||||
import com.ruoyi.health.domain.vo.HealthMedicineTagsVo;
|
||||
import com.ruoyi.health.mapper.HealthMedicineTagsMapper;
|
||||
import com.ruoyi.health.service.IHealthMedicineTagsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 标签管理Service业务层处理
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@Service
|
||||
public class HealthMedicineTagsServiceImpl implements IHealthMedicineTagsService
|
||||
{
|
||||
@Resource
|
||||
private HealthMedicineTagsMapper healthMedicineTagsMapper;
|
||||
|
||||
/**
|
||||
* 查询标签管理
|
||||
*
|
||||
* @param id 标签管理主键
|
||||
* @return 标签管理
|
||||
*/
|
||||
@Override
|
||||
public HealthMedicineTagsVo selectHealthMedicineTagsById(Long id)
|
||||
{
|
||||
return healthMedicineTagsMapper.selectHealthMedicineTagsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签管理列表
|
||||
*
|
||||
* @param healthMedicineTagsDto 标签管理
|
||||
* @return 标签管理
|
||||
*/
|
||||
@Override
|
||||
public List<HealthMedicineTagsVo> selectHealthMedicineTagsList(HealthMedicineTagsDto healthMedicineTagsDto)
|
||||
{
|
||||
return healthMedicineTagsMapper.selectHealthMedicineTagsList(healthMedicineTagsDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增标签管理
|
||||
*
|
||||
* @param healthMedicineTags 标签管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHealthMedicineTags(HealthMedicineTags healthMedicineTags)
|
||||
{
|
||||
healthMedicineTags.setCreateBy(SecurityUtils.getUsername());
|
||||
healthMedicineTags.setCreateTime(DateUtils.getNowDate());
|
||||
healthMedicineTags.setId(IdWorker.getId());
|
||||
return healthMedicineTagsMapper.insertHealthMedicineTags(healthMedicineTags);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改标签管理
|
||||
*
|
||||
* @param healthMedicineTags 标签管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHealthMedicineTags(HealthMedicineTags healthMedicineTags)
|
||||
{
|
||||
healthMedicineTags.setUpdateBy(SecurityUtils.getUsername());
|
||||
healthMedicineTags.setUpdateTime(DateUtils.getNowDate());
|
||||
return healthMedicineTagsMapper.updateHealthMedicineTags(healthMedicineTags);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除标签管理
|
||||
*
|
||||
* @param ids 需要删除的标签管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthMedicineTagsByIds(Long[] ids)
|
||||
{
|
||||
return healthMedicineTagsMapper.removeHealthMedicineTagsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除标签管理信息
|
||||
*
|
||||
* @param id 标签管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthMedicineTagsById(Long id)
|
||||
{
|
||||
return healthMedicineTagsMapper.removeHealthMedicineTagsById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
<?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.ruoyi.health.mapper.HealthDiseasesMapper">
|
||||
|
||||
<resultMap type="HealthDiseasesVo" id="HealthDiseasesResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<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="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="symptom" column="symptom" />
|
||||
<result property="inspectionItems" column="inspection_items" />
|
||||
<result property="medicalTreatment" column="medical_treatment" />
|
||||
<result property="tcmTreatment" column="tcm_treatment" />
|
||||
<result property="surgicalTreatment" column="surgical_treatment" />
|
||||
<result property="physicalTreatment" column="physical_treatment" />
|
||||
<result property="otherTreatment" column="other_treatment" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHealthDiseasesVo">
|
||||
select a.id, a.name, a.type, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.symptom, a.inspection_items, a.medical_treatment, a.tcm_treatment, a.surgical_treatment, a.physical_treatment, a.other_treatment from health_diseases a
|
||||
</sql>
|
||||
|
||||
<select id="selectHealthDiseasesList" parameterType="HealthDiseasesDto" resultMap="HealthDiseasesResult">
|
||||
<include refid="selectHealthDiseasesVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="symptom != null and symptom != ''"> and a.symptom like '%'|| #{symptom}||'%'</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectHealthDiseasesById" parameterType="Long" resultMap="HealthDiseasesResult">
|
||||
<include refid="selectHealthDiseasesVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHealthDiseases" parameterType="HealthDiseases">
|
||||
insert into health_diseases
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null and type != ''">type,</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="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="symptom != null and symptom != ''">symptom,</if>
|
||||
<if test="inspectionItems != null">inspection_items,</if>
|
||||
<if test="medicalTreatment != null">medical_treatment,</if>
|
||||
<if test="tcmTreatment != null">tcm_treatment,</if>
|
||||
<if test="surgicalTreatment != null">surgical_treatment,</if>
|
||||
<if test="physicalTreatment != null">physical_treatment,</if>
|
||||
<if test="otherTreatment != null">other_treatment,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null and type != ''">#{type},</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="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="symptom != null and symptom != ''">#{symptom},</if>
|
||||
<if test="inspectionItems != null">#{inspectionItems},</if>
|
||||
<if test="medicalTreatment != null">#{medicalTreatment},</if>
|
||||
<if test="tcmTreatment != null">#{tcmTreatment},</if>
|
||||
<if test="surgicalTreatment != null">#{surgicalTreatment},</if>
|
||||
<if test="physicalTreatment != null">#{physicalTreatment},</if>
|
||||
<if test="otherTreatment != null">#{otherTreatment},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHealthDiseases" parameterType="HealthDiseases">
|
||||
update health_diseases
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</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="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="symptom != null and symptom != ''">symptom = #{symptom},</if>
|
||||
<if test="inspectionItems != null">inspection_items = #{inspectionItems},</if>
|
||||
<if test="medicalTreatment != null">medical_treatment = #{medicalTreatment},</if>
|
||||
<if test="tcmTreatment != null">tcm_treatment = #{tcmTreatment},</if>
|
||||
<if test="surgicalTreatment != null">surgical_treatment = #{surgicalTreatment},</if>
|
||||
<if test="physicalTreatment != null">physical_treatment = #{physicalTreatment},</if>
|
||||
<if test="otherTreatment != null">other_treatment = #{otherTreatment},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHealthDiseasesById" parameterType="Long">
|
||||
delete from health_diseases where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHealthDiseasesByIds" parameterType="String">
|
||||
delete from health_diseases where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeHealthDiseasesById" parameterType="Long">
|
||||
update health_diseases set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeHealthDiseasesByIds" parameterType="String">
|
||||
update health_diseases set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,112 @@
|
||||
<?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.ruoyi.health.mapper.HealthMedicineTagsMapper">
|
||||
|
||||
<resultMap type="HealthMedicineTagsVo" id="HealthMedicineTagsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<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="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="code" column="code" />
|
||||
<result property="atttibute" column="atttibute" />
|
||||
<result property="atttibuteExtra" column="atttibute_extra" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHealthMedicineTagsVo">
|
||||
select a.id, a.name, a.type, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.code, a.atttibute, a.atttibute_extra from health_medicine_tags a
|
||||
</sql>
|
||||
|
||||
<select id="selectHealthMedicineTagsList" parameterType="HealthMedicineTagsDto" resultMap="HealthMedicineTagsResult">
|
||||
<include refid="selectHealthMedicineTagsVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="code != null and code != ''"> and a.code like '%'|| #{code}||'%'</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectHealthMedicineTagsById" parameterType="Long" resultMap="HealthMedicineTagsResult">
|
||||
<include refid="selectHealthMedicineTagsVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHealthMedicineTags" parameterType="HealthMedicineTags">
|
||||
insert into health_medicine_tags
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null and type != ''">type,</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="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="atttibute != null">atttibute,</if>
|
||||
<if test="atttibuteExtra != null">atttibute_extra,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null and type != ''">#{type},</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="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="atttibute != null">#{atttibute},</if>
|
||||
<if test="atttibuteExtra != null">#{atttibuteExtra},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHealthMedicineTags" parameterType="HealthMedicineTags">
|
||||
update health_medicine_tags
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</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="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="atttibute != null">atttibute = #{atttibute},</if>
|
||||
<if test="atttibuteExtra != null">atttibute_extra = #{atttibuteExtra},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHealthMedicineTagsById" parameterType="Long">
|
||||
delete from health_medicine_tags where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHealthMedicineTagsByIds" parameterType="String">
|
||||
delete from health_medicine_tags where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeHealthMedicineTagsById" parameterType="Long">
|
||||
update health_medicine_tags set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeHealthMedicineTagsByIds" parameterType="String">
|
||||
update health_medicine_tags set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?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.ruoyi.health.mapper.HealthMedicineTagsRelMapper">
|
||||
|
||||
<resultMap type="HealthMedicineTagsRelVo" id="HealthMedicineTagsRelResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="tagId" column="tag_id" />
|
||||
<result property="medicineId" column="medicine_id" />
|
||||
<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="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHealthMedicineTagsRelVo">
|
||||
select a.id, a.tag_id, a.medicine_id, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark from health_medicine_tags_rel a
|
||||
</sql>
|
||||
|
||||
<select id="selectHealthMedicineTagsRelList" parameterType="HealthMedicineTagsRelDto" resultMap="HealthMedicineTagsRelResult">
|
||||
<include refid="selectHealthMedicineTagsRelVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="tagId != null "> and a.tag_id = #{tagId}</if>
|
||||
<if test="medicineId != null "> and a.medicine_id = #{medicineId}</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectHealthMedicineTagsRelById" parameterType="Long" resultMap="HealthMedicineTagsRelResult">
|
||||
<include refid="selectHealthMedicineTagsRelVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHealthMedicineTagsRel" parameterType="HealthMedicineTagsRel">
|
||||
insert into health_medicine_tags_rel
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="tagId != null">tag_id,</if>
|
||||
<if test="medicineId != null">medicine_id,</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="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="tagId != null">#{tagId},</if>
|
||||
<if test="medicineId != null">#{medicineId},</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="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHealthMedicineTagsRel" parameterType="HealthMedicineTagsRel">
|
||||
update health_medicine_tags_rel
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tagId != null">tag_id = #{tagId},</if>
|
||||
<if test="medicineId != null">medicine_id = #{medicineId},</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="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHealthMedicineTagsRelById" parameterType="Long">
|
||||
delete from health_medicine_tags_rel where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHealthMedicineTagsRelByIds" parameterType="String">
|
||||
delete from health_medicine_tags_rel where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeHealthMedicineTagsRelById" parameterType="Long">
|
||||
update health_medicine_tags_rel set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeHealthMedicineTagsRelByIds" parameterType="String">
|
||||
update health_medicine_tags_rel set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user