Compare commits
5 Commits
80d3e9df1c
...
155deda3bd
Author | SHA1 | Date | |
---|---|---|---|
155deda3bd | |||
60fd054e8b | |||
1b51ccfb50 | |||
943be3a612 | |||
347364ecd6 |
2
pom.xml
2
pom.xml
@ -175,8 +175,6 @@
|
|||||||
<artifactId>jjwt</artifactId>
|
<artifactId>jjwt</artifactId>
|
||||||
<version>${jwt.version}</version>
|
<version>${jwt.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- 验证码 -->
|
<!-- 验证码 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pro.fessional</groupId>
|
<groupId>pro.fessional</groupId>
|
||||||
|
@ -17,6 +17,10 @@
|
|||||||
<groupId>zhyc</groupId>
|
<groupId>zhyc</groupId>
|
||||||
<artifactId>zhyc-common</artifactId>
|
<artifactId>zhyc-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -0,0 +1,105 @@
|
|||||||
|
package com.zhyc.module.biosafety.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||||
|
import com.zhyc.module.biosafety.service.ISwMedicTypeService;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.zhyc.common.annotation.Log;
|
||||||
|
import com.zhyc.common.core.controller.BaseController;
|
||||||
|
import com.zhyc.common.core.domain.AjaxResult;
|
||||||
|
import com.zhyc.common.enums.BusinessType;
|
||||||
|
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||||
|
import com.zhyc.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品类型Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/biosafety/type")
|
||||||
|
public class SwMedicTypeController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISwMedicTypeService swMedicTypeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品类型列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:type:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SwMedicType swMedicType)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SwMedicType> list = swMedicTypeService.selectSwMedicTypeList(swMedicType);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出药品类型列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:type:export')")
|
||||||
|
@Log(title = "药品类型", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SwMedicType swMedicType)
|
||||||
|
{
|
||||||
|
List<SwMedicType> list = swMedicTypeService.selectSwMedicTypeList(swMedicType);
|
||||||
|
ExcelUtil<SwMedicType> util = new ExcelUtil<SwMedicType>(SwMedicType.class);
|
||||||
|
util.exportExcel(response, list, "药品类型数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取药品类型详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:type:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(swMedicTypeService.selectSwMedicTypeById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品类型
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:type:add')")
|
||||||
|
@Log(title = "药品类型", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SwMedicType swMedicType)
|
||||||
|
{
|
||||||
|
return toAjax(swMedicTypeService.insertSwMedicType(swMedicType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品类型
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:type:edit')")
|
||||||
|
@Log(title = "药品类型", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SwMedicType swMedicType)
|
||||||
|
{
|
||||||
|
return toAjax(swMedicTypeService.updateSwMedicType(swMedicType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品类型
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:type:remove')")
|
||||||
|
@Log(title = "药品类型", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(swMedicTypeService.deleteSwMedicTypeByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
package com.zhyc.module.biosafety.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||||
|
import com.zhyc.module.biosafety.service.ISwMedicineService;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.zhyc.common.annotation.Log;
|
||||||
|
import com.zhyc.common.core.controller.BaseController;
|
||||||
|
import com.zhyc.common.core.domain.AjaxResult;
|
||||||
|
import com.zhyc.common.enums.BusinessType;
|
||||||
|
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||||
|
import com.zhyc.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/medicine")
|
||||||
|
public class SwMedicineController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISwMedicineService swMedicineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:medicine:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SwMedicine swMedicine)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SwMedicine> list = swMedicineService.selectSwMedicineList(swMedicine);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出药品列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:medicine:export')")
|
||||||
|
@Log(title = "药品", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SwMedicine swMedicine)
|
||||||
|
{
|
||||||
|
List<SwMedicine> list = swMedicineService.selectSwMedicineList(swMedicine);
|
||||||
|
ExcelUtil<SwMedicine> util = new ExcelUtil<SwMedicine>(SwMedicine.class);
|
||||||
|
util.exportExcel(response, list, "药品数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取药品详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:medicine:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(swMedicineService.selectSwMedicineById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:medicine:add')")
|
||||||
|
@Log(title = "药品", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SwMedicine swMedicine)
|
||||||
|
{
|
||||||
|
return toAjax(swMedicineService.insertSwMedicine(swMedicine));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:medicine:edit')")
|
||||||
|
@Log(title = "药品", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SwMedicine swMedicine)
|
||||||
|
{
|
||||||
|
return toAjax(swMedicineService.updateSwMedicine(swMedicine));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:medicine:remove')")
|
||||||
|
@Log(title = "药品", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(swMedicineService.deleteSwMedicineByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
package com.zhyc.module.biosafety.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.service.ISwPrescriptionService;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.zhyc.common.annotation.Log;
|
||||||
|
import com.zhyc.common.core.controller.BaseController;
|
||||||
|
import com.zhyc.common.core.domain.AjaxResult;
|
||||||
|
import com.zhyc.common.enums.BusinessType;
|
||||||
|
import com.zhyc.module.biosafety.domain.SwPrescription;
|
||||||
|
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||||
|
import com.zhyc.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/biosafety/prescription")
|
||||||
|
public class SwPrescriptionController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISwPrescriptionService swPrescriptionService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询处方列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:prescription:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SwPrescription swPrescription)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SwPrescription> list = swPrescriptionService.selectSwPrescriptionList(swPrescription);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出处方列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:prescription:export')")
|
||||||
|
@Log(title = "处方", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SwPrescription swPrescription)
|
||||||
|
{
|
||||||
|
List<SwPrescription> list = swPrescriptionService.selectSwPrescriptionList(swPrescription);
|
||||||
|
ExcelUtil<SwPrescription> util = new ExcelUtil<SwPrescription>(SwPrescription.class);
|
||||||
|
util.exportExcel(response, list, "处方数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取处方详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:prescription:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(swPrescriptionService.selectSwPrescriptionById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增处方
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:prescription:add')")
|
||||||
|
@Log(title = "处方", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SwPrescription swPrescription)
|
||||||
|
{
|
||||||
|
return toAjax(swPrescriptionService.insertSwPrescription(swPrescription));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改处方
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:prescription:edit')")
|
||||||
|
@Log(title = "处方", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SwPrescription swPrescription)
|
||||||
|
{
|
||||||
|
return toAjax(swPrescriptionService.updateSwPrescription(swPrescription));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除处方
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:prescription:remove')")
|
||||||
|
@Log(title = "处方", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(swPrescriptionService.deleteSwPrescriptionByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
package com.zhyc.module.biosafety.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwUnit;
|
||||||
|
import com.zhyc.module.biosafety.service.ISwUnitService;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.zhyc.common.annotation.Log;
|
||||||
|
import com.zhyc.common.core.controller.BaseController;
|
||||||
|
import com.zhyc.common.core.domain.AjaxResult;
|
||||||
|
import com.zhyc.common.enums.BusinessType;
|
||||||
|
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||||
|
import com.zhyc.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品单位Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/biosafety/unit")
|
||||||
|
public class SwUnitController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISwUnitService swUnitService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品单位列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:unit:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SwUnit swUnit)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SwUnit> list = swUnitService.selectSwUnitList(swUnit);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出药品单位列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:unit:export')")
|
||||||
|
@Log(title = "药品单位", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SwUnit swUnit)
|
||||||
|
{
|
||||||
|
List<SwUnit> list = swUnitService.selectSwUnitList(swUnit);
|
||||||
|
ExcelUtil<SwUnit> util = new ExcelUtil<SwUnit>(SwUnit.class);
|
||||||
|
util.exportExcel(response, list, "药品单位数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取药品单位详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:unit:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(swUnitService.selectSwUnitById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品单位
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:unit:add')")
|
||||||
|
@Log(title = "药品单位", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SwUnit swUnit)
|
||||||
|
{
|
||||||
|
return toAjax(swUnitService.insertSwUnit(swUnit));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品单位
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:unit:edit')")
|
||||||
|
@Log(title = "药品单位", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SwUnit swUnit)
|
||||||
|
{
|
||||||
|
return toAjax(swUnitService.updateSwUnit(swUnit));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品单位
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:unit:remove')")
|
||||||
|
@Log(title = "药品单位", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(swUnitService.deleteSwUnitByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
package com.zhyc.module.biosafety.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.zhyc.common.annotation.Log;
|
||||||
|
import com.zhyc.common.core.controller.BaseController;
|
||||||
|
import com.zhyc.common.core.domain.AjaxResult;
|
||||||
|
import com.zhyc.common.enums.BusinessType;
|
||||||
|
import com.zhyc.module.biosafety.service.ISwUsageService;
|
||||||
|
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||||
|
import com.zhyc.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品使用方法Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/biosafety/usage")
|
||||||
|
public class SwUsageController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISwUsageService swUsageService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品使用方法列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:usage:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SwUsage swUsage)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SwUsage> list = swUsageService.selectSwUsageList(swUsage);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出药品使用方法列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:usage:export')")
|
||||||
|
@Log(title = "药品使用方法", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SwUsage swUsage)
|
||||||
|
{
|
||||||
|
List<SwUsage> list = swUsageService.selectSwUsageList(swUsage);
|
||||||
|
ExcelUtil<SwUsage> util = new ExcelUtil<SwUsage>(SwUsage.class);
|
||||||
|
util.exportExcel(response, list, "药品使用方法数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取药品使用方法详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:usage:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(swUsageService.selectSwUsageById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品使用方法
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:usage:add')")
|
||||||
|
@Log(title = "药品使用方法", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SwUsage swUsage)
|
||||||
|
{
|
||||||
|
return toAjax(swUsageService.insertSwUsage(swUsage));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品使用方法
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:usage:edit')")
|
||||||
|
@Log(title = "药品使用方法", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SwUsage swUsage)
|
||||||
|
{
|
||||||
|
return toAjax(swUsageService.updateSwUsage(swUsage));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品使用方法
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biosafety:usage:remove')")
|
||||||
|
@Log(title = "药品使用方法", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(swUsageService.deleteSwUsageByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package com.zhyc.module.biosafety.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.zhyc.common.annotation.Excel;
|
||||||
|
import com.zhyc.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品类型对象 sw_medic_type
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public class SwMedicType extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 编号 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 药品类型 */
|
||||||
|
@Excel(name = "药品类型")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("name", getName())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package com.zhyc.module.biosafety.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.zhyc.common.annotation.Excel;
|
||||||
|
import com.zhyc.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品对象 sw_medicine
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SwMedicine extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 药品编号 */
|
||||||
|
@Excel(name = "药品编号")
|
||||||
|
private String medica;
|
||||||
|
|
||||||
|
/** 药品名称 */
|
||||||
|
@Excel(name = "药品名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 药品类型 */
|
||||||
|
@Excel(name = "药品类型")
|
||||||
|
private Long medicType;
|
||||||
|
|
||||||
|
/** 使用方法 */
|
||||||
|
@Excel(name = "使用方法")
|
||||||
|
private Long usageId;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
@Excel(name = "备注")
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,107 @@
|
|||||||
|
package com.zhyc.module.biosafety.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.zhyc.common.annotation.Excel;
|
||||||
|
import com.zhyc.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方详情对象 sw_pres_detail
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public class SwPresDetail extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 处方id */
|
||||||
|
private Long persId;
|
||||||
|
|
||||||
|
/** 药品id */
|
||||||
|
@Excel(name = "药品id")
|
||||||
|
private Integer mediId;
|
||||||
|
|
||||||
|
/** 用量 */
|
||||||
|
@Excel(name = "用量")
|
||||||
|
private BigDecimal dosage;
|
||||||
|
|
||||||
|
/** 单位 */
|
||||||
|
@Excel(name = "单位")
|
||||||
|
private Integer unitId;
|
||||||
|
|
||||||
|
/** 使用方法 */
|
||||||
|
@Excel(name = "使用方法")
|
||||||
|
private Integer usageId;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setPersId(Long persId)
|
||||||
|
{
|
||||||
|
this.persId = persId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getPersId()
|
||||||
|
{
|
||||||
|
return persId;
|
||||||
|
}
|
||||||
|
public void setMediId(Integer mediId)
|
||||||
|
{
|
||||||
|
this.mediId = mediId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMediId()
|
||||||
|
{
|
||||||
|
return mediId;
|
||||||
|
}
|
||||||
|
public void setDosage(BigDecimal dosage)
|
||||||
|
{
|
||||||
|
this.dosage = dosage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getDosage()
|
||||||
|
{
|
||||||
|
return dosage;
|
||||||
|
}
|
||||||
|
public void setUnitId(Integer unitId)
|
||||||
|
{
|
||||||
|
this.unitId = unitId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUnitId()
|
||||||
|
{
|
||||||
|
return unitId;
|
||||||
|
}
|
||||||
|
public void setUsageId(Integer usageId)
|
||||||
|
{
|
||||||
|
this.usageId = usageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUsageId()
|
||||||
|
{
|
||||||
|
return usageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("persId", getPersId())
|
||||||
|
.append("mediId", getMediId())
|
||||||
|
.append("dosage", getDosage())
|
||||||
|
.append("unitId", getUnitId())
|
||||||
|
.append("usageId", getUsageId())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,131 @@
|
|||||||
|
package com.zhyc.module.biosafety.domain;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.zhyc.common.annotation.Excel;
|
||||||
|
import com.zhyc.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方对象 sw_prescription
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public class SwPrescription extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 处方编号 */
|
||||||
|
@Excel(name = "处方编号")
|
||||||
|
private String no;
|
||||||
|
|
||||||
|
/** 处方名称 */
|
||||||
|
@Excel(name = "处方名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 类型(免疫/保健/驱虫/消毒/疾病治疗) */
|
||||||
|
@Excel(name = "类型", readConverterExp = "免=疫/保健/驱虫/消毒/疾病治疗")
|
||||||
|
private Integer persType;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
@Excel(name = "备注")
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
/** 状态(0禁用1启用) */
|
||||||
|
@Excel(name = "状态(0禁用1启用)")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/** 处方详情信息 */
|
||||||
|
private List<SwPresDetail> swPresDetailList;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNo(String no)
|
||||||
|
{
|
||||||
|
this.no = no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNo()
|
||||||
|
{
|
||||||
|
return no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPersType(Integer persType)
|
||||||
|
{
|
||||||
|
this.persType = persType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPersType()
|
||||||
|
{
|
||||||
|
return persType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setComment(String comment)
|
||||||
|
{
|
||||||
|
this.comment = comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getComment()
|
||||||
|
{
|
||||||
|
return comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<SwPresDetail> getSwPresDetailList()
|
||||||
|
{
|
||||||
|
return swPresDetailList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSwPresDetailList(List<SwPresDetail> swPresDetailList)
|
||||||
|
{
|
||||||
|
this.swPresDetailList = swPresDetailList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("no", getNo())
|
||||||
|
.append("name", getName())
|
||||||
|
.append("persType", getPersType())
|
||||||
|
.append("comment", getComment())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("swPresDetailList", getSwPresDetailList())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.zhyc.module.biosafety.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.zhyc.common.annotation.Excel;
|
||||||
|
import com.zhyc.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品单位对象 sw_unit
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SwUnit extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 编号 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 单位 */
|
||||||
|
@Excel(name = "单位")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/* 国际单位*/
|
||||||
|
private String unit;
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.zhyc.module.biosafety.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.zhyc.common.annotation.Excel;
|
||||||
|
import com.zhyc.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品使用方法对象 sw_usage
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SwUsage extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 编号 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 使用方法 */
|
||||||
|
@Excel(name = "使用方法")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.zhyc.module.biosafety.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品类型Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface SwMedicTypeMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询药品类型
|
||||||
|
*
|
||||||
|
* @param id 药品类型主键
|
||||||
|
* @return 药品类型
|
||||||
|
*/
|
||||||
|
public SwMedicType selectSwMedicTypeById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品类型列表
|
||||||
|
*
|
||||||
|
* @param swMedicType 药品类型
|
||||||
|
* @return 药品类型集合
|
||||||
|
*/
|
||||||
|
public List<SwMedicType> selectSwMedicTypeList(SwMedicType swMedicType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品类型
|
||||||
|
*
|
||||||
|
* @param swMedicType 药品类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSwMedicType(SwMedicType swMedicType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品类型
|
||||||
|
*
|
||||||
|
* @param swMedicType 药品类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSwMedicType(SwMedicType swMedicType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品类型
|
||||||
|
*
|
||||||
|
* @param id 药品类型主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwMedicTypeById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品类型
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwMedicTypeByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.zhyc.module.biosafety.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface SwMedicineMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询药品
|
||||||
|
*
|
||||||
|
* @param id 药品主键
|
||||||
|
* @return 药品
|
||||||
|
*/
|
||||||
|
public SwMedicine selectSwMedicineById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品列表
|
||||||
|
*
|
||||||
|
* @param swMedicine 药品
|
||||||
|
* @return 药品集合
|
||||||
|
*/
|
||||||
|
public List<SwMedicine> selectSwMedicineList(SwMedicine swMedicine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品
|
||||||
|
*
|
||||||
|
* @param swMedicine 药品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSwMedicine(SwMedicine swMedicine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品
|
||||||
|
*
|
||||||
|
* @param swMedicine 药品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSwMedicine(SwMedicine swMedicine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品
|
||||||
|
*
|
||||||
|
* @param id 药品主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwMedicineById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwMedicineByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.zhyc.module.biosafety.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.zhyc.module.biosafety.domain.SwPrescription;
|
||||||
|
import com.zhyc.module.biosafety.domain.SwPresDetail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface SwPrescriptionMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询处方
|
||||||
|
*
|
||||||
|
* @param id 处方主键
|
||||||
|
* @return 处方
|
||||||
|
*/
|
||||||
|
public SwPrescription selectSwPrescriptionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询处方列表
|
||||||
|
*
|
||||||
|
* @param swPrescription 处方
|
||||||
|
* @return 处方集合
|
||||||
|
*/
|
||||||
|
public List<SwPrescription> selectSwPrescriptionList(SwPrescription swPrescription);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增处方
|
||||||
|
*
|
||||||
|
* @param swPrescription 处方
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSwPrescription(SwPrescription swPrescription);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改处方
|
||||||
|
*
|
||||||
|
* @param swPrescription 处方
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSwPrescription(SwPrescription swPrescription);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除处方
|
||||||
|
*
|
||||||
|
* @param id 处方主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwPrescriptionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除处方
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwPrescriptionByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除处方详情
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwPresDetailByPersIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增处方详情
|
||||||
|
*
|
||||||
|
* @param swPresDetailList 处方详情列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchSwPresDetail(List<SwPresDetail> swPresDetailList);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过处方主键删除处方详情信息
|
||||||
|
*
|
||||||
|
* @param id 处方ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwPresDetailByPersId(Long id);
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.zhyc.module.biosafety.mapper;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwUnit;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品单位Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface SwUnitMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询药品单位
|
||||||
|
*
|
||||||
|
* @param id 药品单位主键
|
||||||
|
* @return 药品单位
|
||||||
|
*/
|
||||||
|
public SwUnit selectSwUnitById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品单位列表
|
||||||
|
*
|
||||||
|
* @param swUnit 药品单位
|
||||||
|
* @return 药品单位集合
|
||||||
|
*/
|
||||||
|
public List<SwUnit> selectSwUnitList(SwUnit swUnit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品单位
|
||||||
|
*
|
||||||
|
* @param swUnit 药品单位
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSwUnit(SwUnit swUnit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品单位
|
||||||
|
*
|
||||||
|
* @param swUnit 药品单位
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSwUnit(SwUnit swUnit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品单位
|
||||||
|
*
|
||||||
|
* @param id 药品单位主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwUnitById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品单位
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwUnitByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.zhyc.module.biosafety.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品使用方法Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface SwUsageMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询药品使用方法
|
||||||
|
*
|
||||||
|
* @param id 药品使用方法主键
|
||||||
|
* @return 药品使用方法
|
||||||
|
*/
|
||||||
|
public SwUsage selectSwUsageById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品使用方法列表
|
||||||
|
*
|
||||||
|
* @param swUsage 药品使用方法
|
||||||
|
* @return 药品使用方法集合
|
||||||
|
*/
|
||||||
|
public List<SwUsage> selectSwUsageList(SwUsage swUsage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品使用方法
|
||||||
|
*
|
||||||
|
* @param swUsage 药品使用方法
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSwUsage(SwUsage swUsage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品使用方法
|
||||||
|
*
|
||||||
|
* @param swUsage 药品使用方法
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSwUsage(SwUsage swUsage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品使用方法
|
||||||
|
*
|
||||||
|
* @param id 药品使用方法主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwUsageById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品使用方法
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwUsageByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.zhyc.module.biosafety.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品类型Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface ISwMedicTypeService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询药品类型
|
||||||
|
*
|
||||||
|
* @param id 药品类型主键
|
||||||
|
* @return 药品类型
|
||||||
|
*/
|
||||||
|
public SwMedicType selectSwMedicTypeById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品类型列表
|
||||||
|
*
|
||||||
|
* @param swMedicType 药品类型
|
||||||
|
* @return 药品类型集合
|
||||||
|
*/
|
||||||
|
public List<SwMedicType> selectSwMedicTypeList(SwMedicType swMedicType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品类型
|
||||||
|
*
|
||||||
|
* @param swMedicType 药品类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSwMedicType(SwMedicType swMedicType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品类型
|
||||||
|
*
|
||||||
|
* @param swMedicType 药品类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSwMedicType(SwMedicType swMedicType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品类型
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的药品类型主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwMedicTypeByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品类型信息
|
||||||
|
*
|
||||||
|
* @param id 药品类型主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwMedicTypeById(Long id);
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.zhyc.module.biosafety.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface ISwMedicineService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询药品
|
||||||
|
*
|
||||||
|
* @param id 药品主键
|
||||||
|
* @return 药品
|
||||||
|
*/
|
||||||
|
public SwMedicine selectSwMedicineById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品列表
|
||||||
|
*
|
||||||
|
* @param swMedicine 药品
|
||||||
|
* @return 药品集合
|
||||||
|
*/
|
||||||
|
public List<SwMedicine> selectSwMedicineList(SwMedicine swMedicine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品
|
||||||
|
*
|
||||||
|
* @param swMedicine 药品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSwMedicine(SwMedicine swMedicine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品
|
||||||
|
*
|
||||||
|
* @param swMedicine 药品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSwMedicine(SwMedicine swMedicine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的药品主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwMedicineByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品信息
|
||||||
|
*
|
||||||
|
* @param id 药品主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwMedicineById(Long id);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.zhyc.module.biosafety.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.zhyc.module.biosafety.domain.SwPrescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface ISwPrescriptionService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询处方
|
||||||
|
*
|
||||||
|
* @param id 处方主键
|
||||||
|
* @return 处方
|
||||||
|
*/
|
||||||
|
public SwPrescription selectSwPrescriptionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询处方列表
|
||||||
|
*
|
||||||
|
* @param swPrescription 处方
|
||||||
|
* @return 处方集合
|
||||||
|
*/
|
||||||
|
public List<SwPrescription> selectSwPrescriptionList(SwPrescription swPrescription);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增处方
|
||||||
|
*
|
||||||
|
* @param swPrescription 处方
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSwPrescription(SwPrescription swPrescription);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改处方
|
||||||
|
*
|
||||||
|
* @param swPrescription 处方
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSwPrescription(SwPrescription swPrescription);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除处方
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的处方主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwPrescriptionByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除处方信息
|
||||||
|
*
|
||||||
|
* @param id 处方主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwPrescriptionById(Long id);
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.zhyc.module.biosafety.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品单位Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface ISwUnitService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询药品单位
|
||||||
|
*
|
||||||
|
* @param id 药品单位主键
|
||||||
|
* @return 药品单位
|
||||||
|
*/
|
||||||
|
public SwUnit selectSwUnitById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品单位列表
|
||||||
|
*
|
||||||
|
* @param swUnit 药品单位
|
||||||
|
* @return 药品单位集合
|
||||||
|
*/
|
||||||
|
public List<SwUnit> selectSwUnitList(SwUnit swUnit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品单位
|
||||||
|
*
|
||||||
|
* @param swUnit 药品单位
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSwUnit(SwUnit swUnit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品单位
|
||||||
|
*
|
||||||
|
* @param swUnit 药品单位
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSwUnit(SwUnit swUnit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品单位
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的药品单位主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwUnitByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品单位信息
|
||||||
|
*
|
||||||
|
* @param id 药品单位主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwUnitById(Long id);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.zhyc.module.biosafety.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品使用方法Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface ISwUsageService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询药品使用方法
|
||||||
|
*
|
||||||
|
* @param id 药品使用方法主键
|
||||||
|
* @return 药品使用方法
|
||||||
|
*/
|
||||||
|
public SwUsage selectSwUsageById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品使用方法列表
|
||||||
|
*
|
||||||
|
* @param swUsage 药品使用方法
|
||||||
|
* @return 药品使用方法集合
|
||||||
|
*/
|
||||||
|
public List<SwUsage> selectSwUsageList(SwUsage swUsage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品使用方法
|
||||||
|
*
|
||||||
|
* @param swUsage 药品使用方法
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSwUsage(SwUsage swUsage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品使用方法
|
||||||
|
*
|
||||||
|
* @param swUsage 药品使用方法
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSwUsage(SwUsage swUsage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品使用方法
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的药品使用方法主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwUsageByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品使用方法信息
|
||||||
|
*
|
||||||
|
* @param id 药品使用方法主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSwUsageById(Long id);
|
||||||
|
}
|
@ -0,0 +1,94 @@
|
|||||||
|
package com.zhyc.module.biosafety.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||||
|
import com.zhyc.module.biosafety.mapper.SwMedicTypeMapper;
|
||||||
|
import com.zhyc.module.biosafety.service.ISwMedicTypeService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品类型Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SwMedicTypeServiceImpl implements ISwMedicTypeService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SwMedicTypeMapper swMedicTypeMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品类型
|
||||||
|
*
|
||||||
|
* @param id 药品类型主键
|
||||||
|
* @return 药品类型
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SwMedicType selectSwMedicTypeById(Long id)
|
||||||
|
{
|
||||||
|
return swMedicTypeMapper.selectSwMedicTypeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品类型列表
|
||||||
|
*
|
||||||
|
* @param swMedicType 药品类型
|
||||||
|
* @return 药品类型
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SwMedicType> selectSwMedicTypeList(SwMedicType swMedicType)
|
||||||
|
{
|
||||||
|
return swMedicTypeMapper.selectSwMedicTypeList(swMedicType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品类型
|
||||||
|
*
|
||||||
|
* @param swMedicType 药品类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSwMedicType(SwMedicType swMedicType)
|
||||||
|
{
|
||||||
|
return swMedicTypeMapper.insertSwMedicType(swMedicType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品类型
|
||||||
|
*
|
||||||
|
* @param swMedicType 药品类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSwMedicType(SwMedicType swMedicType)
|
||||||
|
{
|
||||||
|
return swMedicTypeMapper.updateSwMedicType(swMedicType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品类型
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的药品类型主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSwMedicTypeByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return swMedicTypeMapper.deleteSwMedicTypeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品类型信息
|
||||||
|
*
|
||||||
|
* @param id 药品类型主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSwMedicTypeById(Long id)
|
||||||
|
{
|
||||||
|
return swMedicTypeMapper.deleteSwMedicTypeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,94 @@
|
|||||||
|
package com.zhyc.module.biosafety.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||||
|
import com.zhyc.module.biosafety.mapper.SwMedicineMapper;
|
||||||
|
import com.zhyc.module.biosafety.service.ISwMedicineService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SwMedicineServiceImpl implements ISwMedicineService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SwMedicineMapper swMedicineMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品
|
||||||
|
*
|
||||||
|
* @param id 药品主键
|
||||||
|
* @return 药品
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SwMedicine selectSwMedicineById(Long id)
|
||||||
|
{
|
||||||
|
return swMedicineMapper.selectSwMedicineById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品列表
|
||||||
|
*
|
||||||
|
* @param swMedicine 药品
|
||||||
|
* @return 药品
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SwMedicine> selectSwMedicineList(SwMedicine swMedicine)
|
||||||
|
{
|
||||||
|
return swMedicineMapper.selectSwMedicineList(swMedicine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品
|
||||||
|
*
|
||||||
|
* @param swMedicine 药品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSwMedicine(SwMedicine swMedicine)
|
||||||
|
{
|
||||||
|
return swMedicineMapper.insertSwMedicine(swMedicine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品
|
||||||
|
*
|
||||||
|
* @param swMedicine 药品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSwMedicine(SwMedicine swMedicine)
|
||||||
|
{
|
||||||
|
return swMedicineMapper.updateSwMedicine(swMedicine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的药品主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSwMedicineByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return swMedicineMapper.deleteSwMedicineByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品信息
|
||||||
|
*
|
||||||
|
* @param id 药品主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSwMedicineById(Long id)
|
||||||
|
{
|
||||||
|
return swMedicineMapper.deleteSwMedicineById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,134 @@
|
|||||||
|
package com.zhyc.module.biosafety.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.zhyc.common.utils.DateUtils;
|
||||||
|
import com.zhyc.module.biosafety.domain.SwPresDetail;
|
||||||
|
import com.zhyc.module.biosafety.domain.SwPrescription;
|
||||||
|
import com.zhyc.module.biosafety.mapper.SwPrescriptionMapper;
|
||||||
|
import com.zhyc.module.biosafety.service.ISwPrescriptionService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import com.zhyc.common.utils.StringUtils;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SwPrescriptionServiceImpl implements ISwPrescriptionService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SwPrescriptionMapper swPrescriptionMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询处方
|
||||||
|
*
|
||||||
|
* @param id 处方主键
|
||||||
|
* @return 处方
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SwPrescription selectSwPrescriptionById(Long id)
|
||||||
|
{
|
||||||
|
return swPrescriptionMapper.selectSwPrescriptionById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询处方列表
|
||||||
|
*
|
||||||
|
* @param swPrescription 处方
|
||||||
|
* @return 处方
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SwPrescription> selectSwPrescriptionList(SwPrescription swPrescription)
|
||||||
|
{
|
||||||
|
return swPrescriptionMapper.selectSwPrescriptionList(swPrescription);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增处方
|
||||||
|
*
|
||||||
|
* @param swPrescription 处方
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public int insertSwPrescription(SwPrescription swPrescription)
|
||||||
|
{
|
||||||
|
swPrescription.setCreateTime(DateUtils.getNowDate());
|
||||||
|
int rows = swPrescriptionMapper.insertSwPrescription(swPrescription);
|
||||||
|
insertSwPresDetail(swPrescription);
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改处方
|
||||||
|
*
|
||||||
|
* @param swPrescription 处方
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public int updateSwPrescription(SwPrescription swPrescription)
|
||||||
|
{
|
||||||
|
swPrescription.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
swPrescriptionMapper.deleteSwPresDetailByPersId(swPrescription.getId());
|
||||||
|
insertSwPresDetail(swPrescription);
|
||||||
|
return swPrescriptionMapper.updateSwPrescription(swPrescription);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除处方
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的处方主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public int deleteSwPrescriptionByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
swPrescriptionMapper.deleteSwPresDetailByPersIds(ids);
|
||||||
|
return swPrescriptionMapper.deleteSwPrescriptionByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除处方信息
|
||||||
|
*
|
||||||
|
* @param id 处方主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public int deleteSwPrescriptionById(Long id)
|
||||||
|
{
|
||||||
|
swPrescriptionMapper.deleteSwPresDetailByPersId(id);
|
||||||
|
return swPrescriptionMapper.deleteSwPrescriptionById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增处方详情信息
|
||||||
|
*
|
||||||
|
* @param swPrescription 处方对象
|
||||||
|
*/
|
||||||
|
public void insertSwPresDetail(SwPrescription swPrescription)
|
||||||
|
{
|
||||||
|
List<SwPresDetail> swPresDetailList = swPrescription.getSwPresDetailList();
|
||||||
|
Long id = swPrescription.getId();
|
||||||
|
if (StringUtils.isNotNull(swPresDetailList))
|
||||||
|
{
|
||||||
|
List<SwPresDetail> list = new ArrayList<SwPresDetail>();
|
||||||
|
for (SwPresDetail swPresDetail : swPresDetailList)
|
||||||
|
{
|
||||||
|
swPresDetail.setPersId(id);
|
||||||
|
list.add(swPresDetail);
|
||||||
|
}
|
||||||
|
if (list.size() > 0)
|
||||||
|
{
|
||||||
|
swPrescriptionMapper.batchSwPresDetail(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
package com.zhyc.module.biosafety.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwUnit;
|
||||||
|
import com.zhyc.module.biosafety.mapper.SwUnitMapper;
|
||||||
|
import com.zhyc.module.biosafety.service.ISwUnitService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品单位Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SwUnitServiceImpl implements ISwUnitService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SwUnitMapper swUnitMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品单位
|
||||||
|
*
|
||||||
|
* @param id 药品单位主键
|
||||||
|
* @return 药品单位
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SwUnit selectSwUnitById(Long id)
|
||||||
|
{
|
||||||
|
return swUnitMapper.selectSwUnitById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品单位列表
|
||||||
|
*
|
||||||
|
* @param swUnit 药品单位
|
||||||
|
* @return 药品单位
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SwUnit> selectSwUnitList(SwUnit swUnit)
|
||||||
|
{
|
||||||
|
return swUnitMapper.selectSwUnitList(swUnit);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品单位
|
||||||
|
*
|
||||||
|
* @param swUnit 药品单位
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSwUnit(SwUnit swUnit)
|
||||||
|
{
|
||||||
|
return swUnitMapper.insertSwUnit(swUnit);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品单位
|
||||||
|
*
|
||||||
|
* @param swUnit 药品单位
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSwUnit(SwUnit swUnit)
|
||||||
|
{
|
||||||
|
return swUnitMapper.updateSwUnit(swUnit);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品单位
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的药品单位主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSwUnitByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return swUnitMapper.deleteSwUnitByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品单位信息
|
||||||
|
*
|
||||||
|
* @param id 药品单位主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSwUnitById(Long id)
|
||||||
|
{
|
||||||
|
return swUnitMapper.deleteSwUnitById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,94 @@
|
|||||||
|
package com.zhyc.module.biosafety.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||||
|
import com.zhyc.module.biosafety.mapper.SwUsageMapper;
|
||||||
|
import com.zhyc.module.biosafety.service.ISwUsageService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品使用方法Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SwUsageServiceImpl implements ISwUsageService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SwUsageMapper swUsageMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品使用方法
|
||||||
|
*
|
||||||
|
* @param id 药品使用方法主键
|
||||||
|
* @return 药品使用方法
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SwUsage selectSwUsageById(Long id)
|
||||||
|
{
|
||||||
|
return swUsageMapper.selectSwUsageById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品使用方法列表
|
||||||
|
*
|
||||||
|
* @param swUsage 药品使用方法
|
||||||
|
* @return 药品使用方法
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SwUsage> selectSwUsageList(SwUsage swUsage)
|
||||||
|
{
|
||||||
|
return swUsageMapper.selectSwUsageList(swUsage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增药品使用方法
|
||||||
|
*
|
||||||
|
* @param swUsage 药品使用方法
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSwUsage(SwUsage swUsage)
|
||||||
|
{
|
||||||
|
return swUsageMapper.insertSwUsage(swUsage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改药品使用方法
|
||||||
|
*
|
||||||
|
* @param swUsage 药品使用方法
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSwUsage(SwUsage swUsage)
|
||||||
|
{
|
||||||
|
return swUsageMapper.updateSwUsage(swUsage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除药品使用方法
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的药品使用方法主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSwUsageByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return swUsageMapper.deleteSwUsageByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除药品使用方法信息
|
||||||
|
*
|
||||||
|
* @param id 药品使用方法主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSwUsageById(Long id)
|
||||||
|
{
|
||||||
|
return swUsageMapper.deleteSwUsageById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
<?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.zhyc.module.biosafety.mapper.SwMedicTypeMapper">
|
||||||
|
|
||||||
|
<resultMap type="SwMedicType" id="SwMedicTypeResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSwMedicTypeVo">
|
||||||
|
select id, name from sw_medic_type
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSwMedicTypeList" parameterType="SwMedicType" resultMap="SwMedicTypeResult">
|
||||||
|
<include refid="selectSwMedicTypeVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSwMedicTypeById" parameterType="Long" resultMap="SwMedicTypeResult">
|
||||||
|
<include refid="selectSwMedicTypeVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSwMedicType" parameterType="SwMedicType" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sw_medic_type
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSwMedicType" parameterType="SwMedicType">
|
||||||
|
update sw_medic_type
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSwMedicTypeById" parameterType="Long">
|
||||||
|
delete from sw_medic_type where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSwMedicTypeByIds" parameterType="String">
|
||||||
|
delete from sw_medic_type where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,76 @@
|
|||||||
|
<?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.zhyc.module.biosafety.mapper.SwMedicineMapper">
|
||||||
|
|
||||||
|
<resultMap type="SwMedicine" id="SwMedicineResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="medica" column="medica" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="medicType" column="medic_type" />
|
||||||
|
<result property="usageId" column="usage_id" />
|
||||||
|
<result property="comment" column="comment" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSwMedicineVo">
|
||||||
|
select id, medica, name, medic_type, usage_id, comment from sw_medicine
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSwMedicineList" parameterType="SwMedicine" resultMap="SwMedicineResult">
|
||||||
|
<include refid="selectSwMedicineVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="medica != null and medica != ''"> and medica = #{medica}</if>
|
||||||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="medicType != null "> and medic_type = #{medicType}</if>
|
||||||
|
<if test="usageId != null "> and usage_id = #{usageId}</if>
|
||||||
|
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSwMedicineById" parameterType="Long" resultMap="SwMedicineResult">
|
||||||
|
<include refid="selectSwMedicineVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSwMedicine" parameterType="SwMedicine" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sw_medicine
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="medica != null">medica,</if>
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
<if test="medicType != null">medic_type,</if>
|
||||||
|
<if test="usageId != null">usage_id,</if>
|
||||||
|
<if test="comment != null">comment,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="medica != null">#{medica},</if>
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
<if test="medicType != null">#{medicType},</if>
|
||||||
|
<if test="usageId != null">#{usageId},</if>
|
||||||
|
<if test="comment != null">#{comment},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSwMedicine" parameterType="SwMedicine">
|
||||||
|
update sw_medicine
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="medica != null">medica = #{medica},</if>
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
<if test="medicType != null">medic_type = #{medicType},</if>
|
||||||
|
<if test="usageId != null">usage_id = #{usageId},</if>
|
||||||
|
<if test="comment != null">comment = #{comment},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSwMedicineById" parameterType="Long">
|
||||||
|
delete from sw_medicine where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSwMedicineByIds" parameterType="String">
|
||||||
|
delete from sw_medicine where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,129 @@
|
|||||||
|
<?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.zhyc.module.biosafety.mapper.SwPrescriptionMapper">
|
||||||
|
|
||||||
|
<resultMap type="SwPrescription" id="SwPrescriptionResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="no" column="no" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="persType" column="pers_type" />
|
||||||
|
<result property="comment" column="comment" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="SwPrescriptionSwPresDetailResult" type="SwPrescription" extends="SwPrescriptionResult">
|
||||||
|
<collection property="swPresDetailList" ofType="SwPresDetail" column="id" select="selectSwPresDetailList" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap type="SwPresDetail" id="SwPresDetailResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="persId" column="pers_id" />
|
||||||
|
<result property="mediId" column="medi_id" />
|
||||||
|
<result property="dosage" column="dosage" />
|
||||||
|
<result property="unitId" column="unit_id" />
|
||||||
|
<result property="usageId" column="usage_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSwPrescriptionVo">
|
||||||
|
select id, no, name, pers_type, comment, status, update_by, update_time, create_by, create_time from sw_prescription
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSwPrescriptionList" parameterType="SwPrescription" resultMap="SwPrescriptionResult">
|
||||||
|
<include refid="selectSwPrescriptionVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="no != null and no != ''"> and no like concat('%', #{no}, '%')</if>
|
||||||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="persType != null "> and pers_type = #{persType}</if>
|
||||||
|
<if test="status != null "> and status = #{status}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSwPrescriptionById" parameterType="Long" resultMap="SwPrescriptionSwPresDetailResult">
|
||||||
|
select id, no, name, pers_type, comment, status, update_by, update_time, create_by, create_time
|
||||||
|
from sw_prescription
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSwPresDetailList" resultMap="SwPresDetailResult">
|
||||||
|
select id, pers_id, medi_id, dosage, unit_id, usage_id
|
||||||
|
from sw_pres_detail
|
||||||
|
where pers_id = #{pers_id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSwPrescription" parameterType="SwPrescription" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sw_prescription
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="no != null">no,</if>
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
<if test="persType != null">pers_type,</if>
|
||||||
|
<if test="comment != null">comment,</if>
|
||||||
|
<if test="status != null">status,</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>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="no != null">#{no},</if>
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
<if test="persType != null">#{persType},</if>
|
||||||
|
<if test="comment != null">#{comment},</if>
|
||||||
|
<if test="status != null">#{status},</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>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSwPrescription" parameterType="SwPrescription">
|
||||||
|
update sw_prescription
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="no != null">no = #{no},</if>
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
<if test="persType != null">pers_type = #{persType},</if>
|
||||||
|
<if test="comment != null">comment = #{comment},</if>
|
||||||
|
<if test="status != null">status = #{status},</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>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSwPrescriptionById" parameterType="Long">
|
||||||
|
delete from sw_prescription where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSwPrescriptionByIds" parameterType="String">
|
||||||
|
delete from sw_prescription where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSwPresDetailByPersIds" parameterType="String">
|
||||||
|
delete from sw_pres_detail where pers_id in
|
||||||
|
<foreach item="persId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{persId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSwPresDetailByPersId" parameterType="Long">
|
||||||
|
delete from sw_pres_detail where pers_id = #{persId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<insert id="batchSwPresDetail">
|
||||||
|
insert into sw_pres_detail( id, pers_id, medi_id, dosage, unit_id, usage_id) values
|
||||||
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
|
( #{item.id}, #{item.persId}, #{item.mediId}, #{item.dosage}, #{item.unitId}, #{item.usageId})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
@ -0,0 +1,59 @@
|
|||||||
|
<?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.zhyc.module.biosafety.mapper.SwUnitMapper">
|
||||||
|
|
||||||
|
<resultMap type="SwUnit" id="SwUnitResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="unit" column="unit" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSwUnitVo">
|
||||||
|
select id, name,unit from sw_unit
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSwUnitList" parameterType="SwUnit" resultMap="SwUnitResult">
|
||||||
|
<include refid="selectSwUnitVo"/>
|
||||||
|
<where>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSwUnitById" parameterType="Long" resultMap="SwUnitResult">
|
||||||
|
<include refid="selectSwUnitVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSwUnit" parameterType="SwUnit" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sw_unit
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
<if test="unit != null">unit,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
<if test="unit != null">#{unit},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSwUnit" parameterType="SwUnit">
|
||||||
|
update sw_unit
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
<if test="unit != null">unit = #{unit},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSwUnitById" parameterType="Long">
|
||||||
|
delete from sw_unit where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSwUnitByIds" parameterType="String">
|
||||||
|
delete from sw_unit where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,56 @@
|
|||||||
|
<?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.zhyc.module.biosafety.mapper.SwUsageMapper">
|
||||||
|
|
||||||
|
<resultMap type="SwUsage" id="SwUsageResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSwUsageVo">
|
||||||
|
select id, name from sw_usage
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSwUsageList" parameterType="SwUsage" resultMap="SwUsageResult">
|
||||||
|
<include refid="selectSwUsageVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSwUsageById" parameterType="Long" resultMap="SwUsageResult">
|
||||||
|
<include refid="selectSwUsageVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSwUsage" parameterType="SwUsage" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sw_usage
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSwUsage" parameterType="SwUsage">
|
||||||
|
update sw_usage
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSwUsageById" parameterType="Long">
|
||||||
|
delete from sw_usage where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSwUsageByIds" parameterType="String">
|
||||||
|
delete from sw_usage where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user